upsidr / merge-gatekeeper

Get better merge control
MIT License
85 stars 14 forks source link

Update docs to enumerate the specific permissions needed by merge-gatekeeper #62

Closed jdechicchis closed 1 year ago

jdechicchis commented 1 year ago

Thank you for making this Action, super helpful! When deploying this action, I noticed that restricting the permissions to the following seemed sufficient:

name: merge-gatekeeper
on:
  pull_request:
    branches:
    - main

jobs:
  merge-gatekeeper:
    runs-on: ubuntu-latest
    permissions: # Restrict permissions. See https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
      checks: read
      statuses: read
    steps:
    - name: Run Merge Gatekeeper
      uses: upsidr/merge-gatekeeper@v1.2.1
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

I think it would be helpful to update the docs with these permissions if they look correct. Happy to make a PR with these docs changes!

rytswd commented 1 year ago

Hi @jdechicchis! Thanks for raising the issue - I wasn't aware of the permissions stanza, but it looks like a great addition indeed ☺️ If you could create a PR to update the relevant template files, we would be keen to review and test!