Skip to content

Commit 1ccc4e4

Browse files
doc(example): set permissions and only post on pr (#75)
Update the example so it only attempts to post comments on the PR action and set the permissions fields to the minimum values required to leave comments on PRs. Signed-off-by: Randolph Sapp <rs@ti.com> Co-authored-by: shenxianpeng <xianpeng.shen@gmail.com>
1 parent ef29075 commit 1ccc4e4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,25 @@ on:
2323
jobs:
2424
commit-check:
2525
runs-on: ubuntu-latest
26+
permissions:
27+
contents: read
28+
issues: write
29+
pull-requests: write
2630
steps:
2731
- uses: actions/checkout@v4
2832
with:
2933
ref: ${{ github.event.pull_request.head.sha }} # Checkout PR HEAD commit
3034
- uses: commit-check/commit-check-action@v1
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3137
with:
3238
message: true
3339
branch: true
3440
author-name: true
3541
author-email: true
3642
commit-signoff: true
37-
dry-run: true
3843
job-summary: true
39-
pr-comments: true
44+
pr-comments: ${{ github.event_name == 'pull_request' }}
4045
```
4146
4247
## Optional Inputs

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy