Skip to content

Commit

Permalink
asdfasdf
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 28, 2024
1 parent 594391f commit 66cbcc3
Showing 1 changed file with 41 additions and 16 deletions.
57 changes: 41 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -593,19 +593,44 @@ jobs:
cd python/interpret-core
python -m pip install --upgrade black
black --check .
- name: Mark step with a warning
if: ${{ steps.check_python.outcome == 'failure' }}
uses: actions/github-script@v6
with:
script: |
github.rest.checks.update({
owner: context.repo.owner,
repo: context.repo.repo,
check_run_id: check_python,
status: 'completed',
conclusion: 'neutral',
output: {
title: 'Black formatting check',
summary: 'The black formatting check failed but it is marked as neutral.',
}
});
- 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
});
const checkRun = result.data.check_runs.find(run => run.name === 'Check python matches black format');
if (checkRun) {
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.',
}
});
}
# - name: Mark step with a warning
# if: ${{ steps.check_python.outcome == 'failure' }}
# uses: actions/github-script@v6
# with:
# script: |
# github.rest.checks.update({
# owner: context.repo.owner,
# repo: context.repo.repo,
# check_run_id: check_python,
# status: 'completed',
# conclusion: 'neutral',
# output: {
# title: 'Black formatting check',
# summary: 'The black formatting check failed but it is marked as neutral.',
# }
# });

0 comments on commit 66cbcc3

Please sign in to comment.