Skip to content

Commit

Permalink
Permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
rzadp committed Aug 28, 2023
1 parent 1206667 commit cc300c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/rfc-propose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
issue_comment:
types: [created]

permissions:
pull-requests: write

jobs:
rfc-propose:
name: Propose an RFC creation transaction
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ Learn more about the RFC proposal process [here](https://github.com/polkadot-fel
To use the action in a repository, add a job that is going to run on specific comments on PRs:

```yaml
name: RFC propose

on:
issue_comment:
types: [created]

permissions:
pull-requests: write

jobs:
rfc-propose:
name: Propose an RFC creation transaction
Expand All @@ -20,10 +29,11 @@ jobs:
- uses: paritytech/rfc-propose@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

```

### Environment variables

The action uses the `GH_TOKEN` environment variable supplied to it.
The built-in `secrets.GITHUB_TOKEN` variable is enough - it has the access rights to comment on a PR,
which is all that the actions needs.

The built-in `secrets.GITHUB_TOKEN` can be used, as long as it has the `pull-requests` write permissions.

0 comments on commit cc300c9

Please sign in to comment.