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

[BUG] - Contributor workflow comment trigger does not work properly #1769

Closed
pmeier opened this issue May 2, 2023 · 6 comments · Fixed by #1772
Closed

[BUG] - Contributor workflow comment trigger does not work properly #1769

pmeier opened this issue May 2, 2023 · 6 comments · Fixed by #1772
Labels
type: bug 🐛 Something isn't working

Comments

@pmeier
Copy link
Member

pmeier commented May 2, 2023

Describe the bug

By commenting /bot run tests as a maintainer on a PR, we should be able to trigger some workflows that are usually not run for regular contributors. This is done through this workflow

name: Contributor Tests trigger
on:
issue_comment:
types: [created, edited]

The trigger works fine until it comes to checking the permissions of the user sending the comment. We currently check for these roles

if: ${{ !contains(fromJson('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association) }}

They are correct according to the documentation:

author_association string Required

How the author is associated with the repository.

Can be one of: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER

However, I and @iameskild as well, are listed as CONTRIBUTOR, although we should have MAINTAINER permissions.

Expected behavior

Being able to trigger contributor tests as maintainer.

OS and architecture in which you are running Nebari

GitHub repository

How to Reproduce the problem?

Comment /bot run tests on a PR, e.g. #1725. Curious to see what the bot spits out for people with elevated permissions.

Command output

No response

Versions and dependencies used.

No response

Compute environment

None

Integrations

No response

Anything else?

No response

@pmeier pmeier added type: bug 🐛 Something isn't working needs: triage 🚦 Someone needs to have a look at this issue and triage labels May 2, 2023
@pmeier
Copy link
Member Author

pmeier commented May 2, 2023

There is this discussion https://github.com/orgs/community/discussions/18690 where people seem to have the same issue. @aktech Do you have any additional insights on this since your comment?

@pmeier
Copy link
Member Author

pmeier commented May 2, 2023

Looking at my settings, I'm listed as "moderator"

Screenshot from 2023-05-02 14-23-37

Meaning, maybe GHA is not wrong here, but our permissions are setup wrong?

@aktech
Copy link
Member

aktech commented May 2, 2023

Hey @pmeier (and @iameskild) you'd need to change your Organisation visibility to Public, for it to identify both of you as MEMBER as described in the comment I made there.

Screenshot 2023-05-02 at 2 45 00 pm

Screenshot 2023-05-02 at 2 44 49 pm

Here is mine:

Screenshot 2023-05-02 at 2 45 19 pm

@pmeier
Copy link
Member Author

pmeier commented May 2, 2023

I don't see any such option in my personal settings. Are you sure that we have to do it on our side or does this happen on the organization level by an admin? If we need to do it, could you post minimal step-by-step instructions on how to get there?

@aktech
Copy link
Member

aktech commented May 2, 2023

You can change the toggle here (next to your username): https://github.com/orgs/nebari-dev/people

Screenshot 2023-05-02 at 3 07 39 pm

@pmeier
Copy link
Member Author

pmeier commented May 2, 2023

That works, thanks!

@github-project-automation github-project-automation bot moved this from New 📬 to Done 💪🏾 in 🪴 Nebari Project Management May 2, 2023
@Adam-D-Lewis Adam-D-Lewis removed the needs: triage 🚦 Someone needs to have a look at this issue and triage label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

3 participants