-
Notifications
You must be signed in to change notification settings - Fork 736
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
GHPullRequest.getLabels should not go to the GHIssue API endpoint #964
Conversation
Tested, works for me and fixes the problem. |
FYI: I wanted to give this a test, but I ran into an error. I cloned your repo, installed maven (I'm not a Java dev) and applied this patch to
However, the build still failed with this error:
I'm on openSUSE Leap 15.2 with this
|
@francais01 well…do not apply that patch. Not sure why you thought you should. Let me see if I can get a draft PR on the wrapper plugin to deploy a build suitable for testing. |
That worked great, thanks! |
I should mention that to get diagnostics in case it does not work you should also run: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/github-branch-source/2.9.2-rc1270.59e7da6be1ee/github-branch-source-2.9.2-rc1270.59e7da6be1ee.hpi and https://repo.jenkins-ci.org/incrementals/io/jenkins/plugins/github-label-filter/1.0.1-rc24.0a99dc84ef46/github-label-filter-1.0.1-rc24.0a99dc84ef46.hpi |
Unfortunately @bitwiseman is not available, and it is not clear there are any other maintainers to step in during his absence. |
I can merge here but I don't have release permissions unfortunately. |
I'm back. I can cut a release this week. |
*/ | ||
public Collection<GHLabel> getLabels() throws IOException { | ||
public Collection<GHLabel> getLabels() { |
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.
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.
Yes; binary compatible, potentially source-incompatible.
@bitwiseman ping? BTW for some reason https://github.com/hub4j/github-api/releases does not list this PR in the draft section. |
@jglick |
@jvz found that the Jenkins label filter plugin does not work with App authentication. After jenkinsci/github-branch-source-plugin#351 + jenkinsci/github-label-filter-plugin#4 I think I figured out the problem: the lookup of PR labels—and only this method—uses https://developer.github.com/v3/issues/#get-an-issue rather than https://developer.github.com/v3/pulls/#get-a-pull-request as you might expect. Presumably the fact that the App is configured to permit https://developer.github.com/v3/apps/permissions/#permission-on-pull-requests but not https://developer.github.com/v3/apps/permissions/#permission-on-issues makes this not work. I tracked this weird logic down to 372d5ff from 2014 which has little explanation and may have been a workaround for some transient bug in GH long since fixed; I get the expected metadata today with either endpoint (using a PAT):
Possibly fixes jenkinsci/github-label-filter-plugin#3 (not yet verified).