Setup instructions
teoljungberg opened this issue ยท 4 comments
๐
We're using tibdex/autosquash at my company and are very happy with it. It's setup to use a the personal access token of a shared account we have, sadly that account is so broadly used that it is using up a lot of our access tokens and gets rate limited often enough that it is starting to become an annoyance.
In my research - I found this repository and wondered how I would go about setting this up, and if it would resolve our issue?
With the abundance of options to setup a new GitHub App I was a bit stunned to say the least, is there a default set of options that needs to be setup that you could share?
Hi Teo, if you're getting range limited using a personal access token you will probably get rate limited too with a GitHub App. Maybe you could reach out to GitHub to buy more credits?
Here is how I use github-app-token
with Autosquash:
name: Autosquash
on:
check_run:
types: [completed]
pull_request:
types: [closed, labeled]
pull_request_review:
types: [submitted]
status: {}
jobs:
autosquash:
runs-on: ubuntu-18.04
name: Autosquash
steps:
- id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: tibdex/autosquash@v2
with:
github_token: ${{ steps.generate_token.outputs.token }}
Thanks for the example! Are there any particular options that should we used when setting up the GitHub App? Last I tried doing this I was confused and overcome with how many options there were to choose from.
Could you share an example setup of the GitHub app configuration?
@teoljungberg If it helps you, I have a short setup guide for setting up a minimal GitHub App for the sole purpose of generating tokens. The only thing you might need to change is the scopes you require.
Thanks @peter-evans - I'll give it a whirl.