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

pr-release should be a github app to avoid incorrect contributor assignment #292

Open
JAForbes opened this issue Mar 16, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@JAForbes
Copy link
Owner

For small projects it is fine. But for shared collaborative efforts, the owner of the GH_TOKEN shouldn't be the commiter for every pr-release managed git change.

github apps can also be scoped to a single repo instead of all repo's a developer's personal access token has access to

@JAForbes JAForbes added the enhancement New feature or request label Mar 16, 2022
@JAForbes
Copy link
Owner Author

I did a bit of research. I think to keep cost down and security up this should be the flow.

You install pr-release as an app on a repo. pr-release requests the exact permissions it needs.

It then redirects you to a setup page. The setup page fetches the app token and asks the end user to add it to their secrets as PRR_TOKEN. They can also optionally provide secrets_write capability and pr-release can do this for them.

pr-release then checks if the repo has installed the token by generating a workflow that does some permission checks via octokit and running it. (yagni)

Then from then on, there's nothing happening serverside, we just have token generation effectively, but everything else runs on the github workflows, but it will read as pr-release making changes not the person who installed the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant