Skip to content

Commit c063f5a

Browse files
authored
Explain permissions in README (#15)
1 parent 39de5be commit c063f5a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ This action adds to Pull Request descriptions using markdown. It checks if the
1717

1818
`github_token`: Usually ${{ secrets.GITHUB_TOKEN }}, but a personal access token can also be used
1919

20+
## Permissions
21+
22+
Pull requests from forks have reduced job running rights. Provide your GITHUB_TOKEN with explicit permissions to change that. Read more [here](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token).
23+
24+
```
25+
permissions:
26+
pull-requests: write
27+
```
28+
29+
2030
## Example
2131

2232
Create or modify a GitHub workflow, like below. E.g. `./github/workflows/pr-append.yml`
@@ -29,17 +39,19 @@ on:
2939
jobs:
3040
test:
3141
runs-on: ubuntu-latest
42+
permissions:
43+
pull-requests: write
3244
steps:
3345
- uses: DerekRoberts/action-pr-description-add@v0.0.1
3446
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
3548
add_markdown: |
3649
---
50+
3751
# Things!
3852
## Excitement!
39-
[Links!](https://gov.bc.ca)
53+
[Links!](https://google.ca)
4054
`Markdown!`
41-
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
4355
```
4456
4557
## Acknowledgements

0 commit comments

Comments
 (0)