-
-
Notifications
You must be signed in to change notification settings - Fork 59
Fix getting permissions for the contributors who are a part of the team #424
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for this PR. The reason I switched to GraphQL was to support the Assuming this is the correct REST API, it looks like |
Documentation for
As far as I understand it for user with If map it to what we can manually set via UI That might be fine for it to return I was able to test it and see that it returns |
As an alternative, maybe we can leave the graphql endpoint and use it as the main method to find permissions, and if it returns
|
I suggested having a fallback here: #120 (comment) Another possible option, but one that I haven't looked into yet to see if it's feasible, is only using GraphQL if the slash-command-dispatch configuration contains permission levels configured for |
@peter-evans I found that a response from
I tested it against individual users with different permission level and also against team with different permission level. And see that Seems we can also use This work around seems more reliable to me and works well with teams and individual contributors. As well as when user is within the team and also an individual contributor, it returns the highest permission for him correctly. Also covers support for What do you think about this approach? ![]() |
Resolves #396
This PR fixes the
getActorPermission
function, so now it returns permissions for the contributors who are a part of the team.