Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pngwn committed Jan 31, 2024
1 parent c94a4b2 commit 62182fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/commit-status/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ inputs:
commit_status:
description: "Whether to create a commit status"
default: "true"
url:
description: "URL to link to"
runs:
using: "node20"
main: "dist/index.js"
9 changes: 5 additions & 4 deletions packages/commit-status/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ async function run() {
const job_id = getInput("job_id");
const mergeable = getInput("mergeable");
const commit_status = getInput("commit_status");

const url = getInput("url");
let _url = url === "false" ? false : url;
if (commit_status === "false") {
return;
}
Expand Down Expand Up @@ -58,7 +59,7 @@ async function run() {
mergeable === "true"
? context
: "Cannot check out PR as it is not mergeable",
workflow_run.data.html_url
_url || workflow_run.data.html_url
);
} else {
const context = has_changes
Expand All @@ -73,7 +74,7 @@ async function run() {
mergeable === "true"
? context
: "Cannot check out PR as it is not mergeable",
workflow_run.data.html_url
_url || workflow_run.data.html_url
);
}

Expand Down Expand Up @@ -133,7 +134,7 @@ async function run() {
state,
_workflow_name,
duration,
html_url || workflow_run.data.html_url
_url || html_url || workflow_run.data.html_url
);
}

Expand Down

0 comments on commit 62182fd

Please sign in to comment.