Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the needed permissions/scopes to the custom action documentation #259

Closed
rajbos opened this issue Oct 26, 2023 · 4 comments
Closed

Add the needed permissions/scopes to the custom action documentation #259

rajbos opened this issue Oct 26, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@rajbos
Copy link
Contributor

rajbos commented Oct 26, 2023

TL;DR

The document does not state the necessary scopes for the authentication to GitHub, which leads to a permissions error on runtime (which also does not show the necessary scopes needed).

I would expect that info in the README here.

Expected behavior

Documentation indicates the scopes that are needed

Observed behavior

No response

Version

main

On which operating system are you using legitify?

Linux

Relevant log output

Running on a single repo:

legitify failed with:
Using Github Cloud
Error: repository <org>/<repo> insufficient permissions

No response

Additional information

No response

@rajbos rajbos added the bug Something isn't working label Oct 26, 2023
@noamd-legit
Copy link
Contributor

Hi @rajbos

We mention in the readme the following scopes:

admin:org, read:enterprise, admin:org_hook, read:org, repo, read:repo_hook

Did you mean something else?

@rajbos
Copy link
Contributor Author

rajbos commented Nov 7, 2023

@noamd-legit , that is for the run on the org level, indeed. I would also recommend to add the necessary permissions for when running in the current repo. It is possible to run this action with just the GITHUB_TOKEN if you want to, correct? Add those permissions with the permissions keyword to the example?

@noamd-legit
Copy link
Contributor

Yeah you can use GITHUB_TOKEN for the action but only when running for the current repository otherwise it will fail.
I'll clarify in the readme

Thank you!

@noamd-legit
Copy link
Contributor

@rajbos I reverified the behavior, unfortunately currently GITHUB_TOKEN is not supported by the action since legitify requires access to https://api.github.com/user/orgs API

I opened a feature request here: #265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants