Skip to content

Commit

Permalink
CI: Fix /autofix command (#646)
Browse files Browse the repository at this point in the history
Currently, our `/autofix` command does not work because the jobs don't
have the 'write' permission. This will fix it, but not until the change
ends up in `main`.

This permission can be set globally too, but this is more secure.
  • Loading branch information
balos1 authored Jan 18, 2025
1 parent 3f72e6c commit f963373
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
needs: format_check
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Checkout the GitHub created reference for the PR.
# The only way to do this is by using the "issue" number
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
needs: spelling_check
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Checkout the GitHub created reference for the PR.
# The only way to do this is by using the "issue" number
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-swig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/autofix')) }}
needs: swig_check
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Checkout the GitHub created reference for the PR.
# The only way to do this is by using the "issue" number
Expand Down

0 comments on commit f963373

Please sign in to comment.