maxheld83 / ghactions

GitHub actions for R and accompanying R package
https://www.maxheld.de/ghactions/
MIT License
169 stars 17 forks source link

Document (minimum) required scope for PAT #342

Open sneumann opened 4 years ago

sneumann commented 4 years ago

While PATs will go away once #77 is fixed, the documentation https://github.com/marketplace/actions/github-pages-deploy#secrets says You therefore have to create a custom Personal Access Token (PAT) but when accessing https://github.com/settings/tokens/new I have tons of options for Scopes define the access for personal tokens. What would be the minimum permissions required to push stuff in a public repo to its (public) gh-pages and trigger the rebuild ? Yours, Steffen

maxheld83 commented 4 years ago

I've usually selected the entire repo scope, though as per the docs, for a public repo as you describe, public_repo should do the trick. Details on the scopes are here: https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/

I'll add this in the documentation; thanks for reporting.

Also, incidentally, this is a concern for my ghpages repo, whose action is here just being wrapped. I'm crosslisting this issue there -> https://github.com/maxheld83/ghpages/issues/22

maxheld83 commented 4 years ago

also, a bit of a warning: this repo (ghactions) is currently out of date with the relaunch of GitHub actions.

You can still use the ghpages action, but the main.workflow stuff written out by this package (ghactions) is deprecated by github. Working on it :).

sneumann commented 4 years ago

For those that already the main.workflow, here is how to convert to the new format: https://help.github.com/en/articles/migrating-github-actions-from-hcl-syntax-to-yaml-syntax Will report back whether public_repo once was sufficient once admitted to the public beta...