Skip to content

Commit

Permalink
Merge pull request #44 from github/update-docs
Browse files Browse the repository at this point in the history
Update Docs
  • Loading branch information
GrantBirki authored Nov 2, 2023
2 parents efd7cd6 + 1cd6fa5 commit 16a1198
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ jobs:
- name: combine-prs
id: combine-prs
uses: github/[email protected] # where X.X.X is the latest version
with:
labels: combined-pr # Optional: add a label to the combined PR
```
## Permissions
Expand Down Expand Up @@ -119,6 +121,6 @@ If you need CI to re-run on your newly created "combined" PR, you'll need to use

### GitHub App Setup

Alternatively, you can use a GitHub App token. This is the recommended approach as it is more secure than a personal access token and a lot more scalable for large organizations.
Alternatively, you can use a GitHub App token. This is the **recommended** approach as it is **more secure** than a personal access token and a lot more scalable for large organizations.

Checkout the dedicated [documentation here](docs/github-app-setup.md) for more information on how to set this up.
18 changes: 12 additions & 6 deletions docs/github-app-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,27 @@ on:
- cron: '0 1 * * 3' # Wednesday at 01:00
workflow_dispatch:

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

jobs:
combine-prs:
runs-on: ubuntu-latest

steps:
- name: Use GitHub App Token
uses: wow-actions/use-app-token@d7957e08172ca2e8e49b35b8d266ad585885edc7 # pin@v2.0.2
id: generate_token
uses: actions/create-github-app-token@eaddb9eb7e4226c68cf4b39f167c83e5bd132b3e # pin@v1.5.1
id: app-token
with:
app_id: ${{ secrets.APP_ID }} # The ID of the GitHub App
private_key: ${{ secrets.PRIVATE_KEY }} # The private key of the GitHub App
fallback: ${{ secrets.GITHUB_TOKEN }} # fall back to the default token if the app token is not available
app-id: ${{ secrets.APP_ID }} # The ID of the GitHub App
private-key: ${{ secrets.PRIVATE_KEY }} # The private key of the GitHub App

- name: combine-prs
uses: github/[email protected] # where X.X.X is the latest version
with:
github_token: ${{ steps.generate_token.outputs.BOT_TOKEN }} # A GitHub app token generated by the previous step
github_token: ${{ steps.app-token.outputs.token }} # A GitHub app token generated by the previous step
labels: combined-pr
```

0 comments on commit 16a1198

Please sign in to comment.