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

Be more explicit about who can trigger PaaS #445

Merged
merged 1 commit into from Mar 2, 2020

Conversation

csomh
Copy link
Member

@csomh csomh commented Mar 2, 2020

"collaborators" was not an exact definition for who can trigger
Packit-as-a-Service. Make sure the error message is explicit about the
GitHub permissions required.

Partially fixes #442.

Signed-off-by: Hunor Csomortáni csomh@redhat.com

"collaborators" was not an exact definition for who can trigger
Packit-as-a-Service. Make sure the error message is explicit about the
GitHub permissions required.

Partially fixes packit#442.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
@csomh csomh requested a review from lachmanfrantisek Mar 2, 2020
@@ -380,7 +383,10 @@ def __init__(self, config: ServiceConfig, event: PullRequestCommentEvent):
def run(self) -> HandlerResults:
collaborators = self.project.who_can_merge_pr()
if self.event.github_login not in collaborators | self.config.admins:
msg = "Only collaborators can trigger Packit-as-a-Service"
msg = (
"Only users with write or admin permissions to the repository "
Copy link
Member

@lachmanfrantisek lachmanfrantisek Mar 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am only a little confused about the write permissions meaning. (Since in the comments, you can see terms like member, collaborator, ...)

Copy link
Member Author

@csomh csomh Mar 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand it correctly than member and collaborator are org membership terms (roles?), but we check for repository permission levels.

(Yes, this part of GitHub is very confusing.)

@softwarefactory-project-zuul
Copy link
Contributor

softwarefactory-project-zuul bot commented Mar 2, 2020

Build succeeded.

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Thanks for making it clear!

@csomh csomh merged commit d1c2be3 into packit:master Mar 2, 2020
4 checks passed
@csomh csomh deleted the who-can-trigger branch Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing documentation about permissions for triggering builds
3 participants