-
Notifications
You must be signed in to change notification settings - Fork 73
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
Improved how it checks for github collaborator access #111
Improved how it checks for github collaborator access #111
Conversation
xocasdashdash
commented
May 27, 2022
- Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- Ensure that the pull request title represents the desired changelog entry
- Please describe what you did
- Should allow closing issueCommentTrigger not working when collaborator is part of GitHub Teams #107 The handleIssueComment handler stopped working after GH chaged required permissions to fetch collaborators #104
CollaboratorService collaboratorService = new CollaboratorService(client); | ||
|
||
try { | ||
return collaboratorService.isCollaborator(repository, User); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ends up calling this endpoint:
/repos/${OWNER}/${REPO}/collaborators/${username}
So it leaves all of the decision logic back on github instead of here.
return false; | ||
} | ||
} | ||
|
||
public static List<String> getCollaborators(@Nonnull final Job<?,?> job) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method can be deleted as its not used anymore. I can do that with no issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I don't see an issue with removing it.
Sorry to ping you @aaronjwhiteside , is there any way of speeding up getting this PR merged and a new release cut? not sure who to ping about this and it's been 2+ months since i opened it. |
@xocasdashdash sorry it's been a crazy couple of months. I will review this PR and let you know. I think the changes look pretty good though |
Signed-off-by: Joaquin Fernández Campo <joaquin.campo@paddle.com>
@aaronwalker Updated the PR removing the dead code, let me know if there's anything else to do! |
@aaronwalker hey, sorry to ping, do you think this can get merged now? |
Just a quick one before I merge this... Have you tested the Incrementals plugin version https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/pipeline-github/2.8-140.9440018594b6/ ? |
I did not know this existed! Will get back to you once i've validated it! |
UPDATE: works fine with this version: 2.8-140.9440018594b6 Was simple missing correct auth config for the repo on the GitHub app.
|
Nice! |
@aaronwalker are you ok with @TueDissingWork tests? |