Skip to content

Commit 7e829f9

Browse files
Merge pull request #21 from aws-github-ops/khushail/readmeUpdate
chore: added write permissions section in the Readme
2 parents 068d2ff + ec64f96 commit 7e829f9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/handle-stale-discussions.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ jobs:
99
handle-stale-discussions:
1010
name: Handle stale discussions
1111
runs-on: ubuntu-latest
12+
permissions:
13+
discussions: write
1214
steps:
1315
- name: Stale discussions action
14-
uses: aws-github-ops/handle-stale-discussions@main
16+
uses: aws-github-ops/handle-stale-discussions@v1
1517
env:
1618
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1719

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ In addition to handling proposed answers, this action will automatically close a
88

99
## Steps to enable this action in your repository
1010

11-
1. A valid GitHub token is required to use this action. The GITHUB_TOKEN for your repository can be generated by GitHub during workflow execution when passed in as `${{ secrets.GITHUB_TOKEN }}`. Please check the permissions in Repository settings to grant write permissions to the token.
11+
1. A valid GitHub token is required to use this action. The GitHub token for your repository can be generated by GitHub during workflow execution when passed in as `${{ secrets.GITHUB_TOKEN }}`. The GitHub token must have <b>discussions: write permissions</b>, these permissions can be granted in the workflow file.
12+
13+
Alternatively, write permissions can be granted to your repository's GitHub token for all workflows in your repository. Please check the permissions in your Repository `Settings -> Actions -> General` to grant write permissions to the token.
14+
1215

1316
![Action Settings in repo](images/repoTokenSettings.png)
1417

@@ -32,8 +35,10 @@ jobs:
3235
run-action:
3336
name: Handle stale discussions
3437
runs-on: ubuntu-latest
38+
permissions:
39+
discussions: write
3540
steps:
36-
- uses: aws-github-ops/handle-stale-discussions@main
41+
- uses: aws-github-ops/handle-stale-discussions@v1
3742
with:
3843
github-token: ${{secrets.GITHUB_TOKEN}}
3944
attention-label: needs-attention

0 commit comments

Comments
 (0)