-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from github/update-docs
Update Docs around Actions Settings
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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. | ||
|
@@ -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` | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.