Include PAT details in README?
The README mentions using a PAT when you want to re-trigger CI after adding a commit, but doesn’t mention the minimum permissions the PAT requires.
I created a PAT for add-and-commit to use, which I thought had enough permissions, but apparently I missed something, because it didn’t work.
Similarly, since the point of the PAT is to get around the don’t-rerun-checks guard that prevents build cycles, it would be helpful to have a note with some guidance on how to avoid check cycles (like what to put in an if on the add-and-commit step to ensure that it hasn’t already run on that PR, or maybe a conditional to set push to false or something).
Agreed! Sounds like some useful info
I forgot to update this. It turns out I had some other issue, and the original permissions I had were (more than) sufficient. So, here’s the minimum Personal Access Token:
- Repository access: the repositories you’re using
EndBug/add-and-commitin (“All repositories” is guaranteed to cover it) - Permissions:
- Repository:
- Contents: Read and write
- Metadata: Read-only (this can’t be modified)
- Account: None
- Repository:
For my purposes, I didn’t need a guard (and I imagine many other users won’t either) – if add-and-commit succeeds, the commit ensures the re-run of my job doesn’t need to make another commit, so I didn’t need to do anything special.