Skip to content

Commit

Permalink
[CI] remove contents write permission from code_formatter job. (micro…
Browse files Browse the repository at this point in the history
…soft#6068)

Only apply_diff job needs conntents write permission. 
code_formatter job only needs pull-request write permission.
  • Loading branch information
python3kgae authored Nov 27, 2023
1 parent 426f6cb commit 7b222ff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/clang-format-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ on:
types: [opened,synchronize]
issue_comment:
types: edited
permissions:
pull-requests: write
contents: write

jobs:
code_formatter:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -65,6 +64,9 @@ jobs:
runs-on: ubuntu-latest
env:
TMP_DIFF_FILE: /tmp/diff.patch
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/github-script@v3
id: get-pr
Expand Down

0 comments on commit 7b222ff

Please sign in to comment.