Skip to content

Commit

Permalink
update documentation, remove bot user, allow app to
Browse files Browse the repository at this point in the history
bypass branch protection
  • Loading branch information
robandpdx committed Aug 3, 2023
1 parent edb356b commit 84e3d56
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ The slack notification can be configured by setting the `SLACK_MESSAGE_FILE`. Th
- `#l` is replaced with the label configured in `EMERGENCY_LABEL`
- `#i` is replaced with the url to the issue created, if issue creation is enabled
## Environment setup
### Create Bot User
If you want the app to merge the emergency PR, and you have "Require status checks to pass before merging" in your branch protection, you will need to give the bot user `owner` permissions on the Org or repo.

If you do not have "Require status checks to pass before merging" you can make the bot user a standard user. If you also have more than 1 approval required you will need to configure the bot user in your branch protection section "Allow specified actors to bypass pull request requirements" in order to allow merging.

Generate a PAT for the bot user with repo scope. Configure SSO for the PAT, authorizing the PAT for your org.
### Create GitHub App
Create the GH App in your org or repo. Define a client secrent. Generate a private key.
#### Grant repository permissions
Expand All @@ -38,6 +32,9 @@ Check `Issues`
Check `Issue comment`
Check `Pull request`

#### Allow app to bypass branch protection
If you want the app to merge the emergency PR, and you have "Require status checks to pass before merging" in your branch protection, you will need to allow the app to bypass branch protection.

Once you have the bot user setup and the GitHub app configured you are ready to deploy!

### Create a Slack App
Expand Down

0 comments on commit 84e3d56

Please sign in to comment.