Skip to content

Commit

Permalink
chore: more debug output to test why skipped check-run gets not updat…
Browse files Browse the repository at this point in the history
…ed to in_progress correctly
  • Loading branch information
hansjoergventx committed Oct 21, 2023
1 parent cc1b404 commit e4a0b3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-infracost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
infracost comment github --path=/tmp/infracost-base.json \
--repo=$GITHUB_REPOSITORY \
--github-token=${{github.token}} \
--pull-request=${{github.event.pull_request.number}} \
--pull-request=${{ github.event.client_payload.pull_request.number }} \
--behavior=update
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
});
console.log(`update check-run result is: ${JSON.stringify(result, 0, 2)}`);
console.log(`Successfully updated check run to 'in_progress'. ID: ${result.id}`);
console.log(`Successfully updated check run to 'in_progress'. Name: ${result.name}`);
return result;
} else {
console.log('No skipped check runs found with the specified name.');
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/pr-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,16 @@ jobs:
const check = checks.check_runs.filter(c => c.name === process.env.job && c.conclusion === "skipped");
if (check.length > 0) {
console.log(`Skipped check run found with ID: ${check[0].id}`);
console.log(`Skipped check run found with name: ${check[0].name}`);
console.log(`context.repo: ${JSON.stringify(context.repo, 0, 2)}`);
// Update the check run to 'in_progress'
const { data: result } = await github.rest.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'in_progress'
status: 'in_progress',
conclusion: ''
});
console.log(`update check-run result is: ${JSON.stringify(result, 0, 2)}`);
Expand Down Expand Up @@ -279,7 +282,7 @@ jobs:
});
console.log(`update check-run result is: ${JSON.stringify(result, 0, 2)}`);
console.log(`Successfully updated check run to 'in_progress'. ID: ${result.id}`);
console.log(`Successfully updated check run to 'in_progress'. Name: ${result.name}`);
return result;
} else {
console.log('No skipped check runs found with the specified name.');
Expand Down

0 comments on commit e4a0b3b

Please sign in to comment.