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
Merged

Be more explicit about who can trigger PaaS #445

merged 1 commit into from Mar 2, 2020

Conversation

csomh
Copy link
Contributor

@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 #442.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
@@ -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

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
Contributor Author

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

Build succeeded.

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Choose a reason for hiding this comment

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

Thanks for making it clear!

@csomh csomh merged commit d1c2be3 into packit:master Mar 2, 2020
@csomh csomh deleted the who-can-trigger branch June 17, 2020 09:22
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