Skip to content

Commit

Permalink
workflows/triage: fix excessive-permissions zizmor error
Browse files Browse the repository at this point in the history
This addresses the `excessive-permissions` error from `zizmor` by
moving the workflow permissions to the jobs where they're needed.
  • Loading branch information
samford committed Dec 15, 2024
1 parent 56fb766 commit 4c85cee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ concurrency:
group: "triage-${{ github.event.number }}"
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
limit-pull-requests:
if: >
always() && github.repository_owner == 'Homebrew' &&
(github.event_name == 'pull_request_target' &&
github.event.action == 'opened')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: Homebrew/actions/limit-pull-requests@master
with:
Expand All @@ -31,6 +30,9 @@ jobs:

triage:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check commit format
uses: Homebrew/actions/check-commit-format@master
Expand Down

0 comments on commit 4c85cee

Please sign in to comment.