Skip to content

Commit

Permalink
asdfdsa
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 28, 2024
1 parent e250bba commit cb3f40c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -638,3 +638,38 @@ jobs:
# summary: 'The black formatting check failed but it is marked as neutral.',
# }
# });

format_black_adjust:
needs: [format_black]
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Update check run to neutral if black format check fails
if: ${{ steps.check_python.outcome == 'failure' }}
uses: actions/github-script@v6
with:
script: |
const result = await github.rest.checks.listForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha
});
console.log("Check runs found:", result.data.check_runs.map(run => run.name));
const checkRun = result.data.check_runs.find(run => run.name === 'format_black');
if (checkRun) {
console.log("Updating check run with ID:", checkRun.id);
await github.rest.checks.update({
owner: context.repo.owner,
repo: context.repo.repo,
check_run_id: checkRun.id,
status: 'completed',
conclusion: 'neutral',
output: {
title: 'Black formatting check',
summary: 'The black formatting check failed but it is marked as neutral.',
}
});
} else {
console.log("No matching check run found.");
}

0 comments on commit cb3f40c

Please sign in to comment.