Skip to content

Commit

Permalink
Merge pull request #18 from github/update-docs
Browse files Browse the repository at this point in the history
Update Docs around Actions Settings
  • Loading branch information
GrantBirki authored Apr 2, 2023
2 parents 89b872b + 81f43ae commit b4adb8c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ on:
- cron: '0 1 * * 3' # Wednesday at 01:00
workflow_dispatch: # allows you to manually trigger the workflow

# The minimum permissions required to run this Action
permissions:
contents: write
pull-requests: write
checks: read

jobs:
combine-prs:
runs-on: ubuntu-latest
Expand All @@ -64,6 +70,24 @@ jobs:
uses: github/[email protected] # where X.X.X is the latest version
```
## Permissions
This Action requires the following permissions:
```yaml
# The minimum permissions required to run this Action
permissions:
contents: write # to create a new branch and merge other branches together
pull-requests: write # to create a new PR with the combined changes
checks: read # to check if CI is passing or not before combining PRs
```
This Action also requires that GitHub Action's has permissions to create new pull requests. You can read more about this feature here: [GitHub Blog Post](https://github.blog/changelog/2022-05-03-github-actions-prevent-github-actions-from-creating-and-approving-pull-requests/)
To enable this setting, go to `Actions` > `General` > `Workflow permissions` in your repository settings. Check the following box and click save:

![permissions](docs/assets/actions-permissions.png)

## Regex Branch Patterns

By default, this Action uses the `branch_prefix` option set to `dependabot` to match the branches to combine. However, you can also use the `branch_regex` option to match branches using a regex pattern. This is useful if you want to match branches that don't have a specific prefix.
Expand Down Expand Up @@ -115,7 +139,7 @@ jobs:
github_token: ${{ steps.generate_token.outputs.BOT_TOKEN }} # A GitHub app token generated by the previous step
```

If you go the GitHub App route, it will need the following permissions:
If you go the GitHub App route, it will need the following permissions for your GitHub App:

- Commit statuses: `Read-only`
- Contents: `Read and write`
Expand Down
Binary file added docs/assets/actions-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b4adb8c

Please sign in to comment.