[JENKINS-56830] alternative use of 'html_url' in payload of event#212
Merged
KostyaSha merged 1 commit intojenkinsci:masterfrom Sep 17, 2019
Merged
[JENKINS-56830] alternative use of 'html_url' in payload of event#212KostyaSha merged 1 commit intojenkinsci:masterfrom
KostyaSha merged 1 commit intojenkinsci:masterfrom
Conversation
KostyaSha
reviewed
Aug 28, 2019
src/main/java/org/jenkinsci/plugins/github/webhook/subscriber/DefaultPushGHEventSubscriber.java
Outdated
Show resolved
Hide resolved
As documented in github API docs (https://developer.github.com/v3/repos/#response) the url field of the event should/could point to the API endpoint. In the github-plugin it is expected to work on the public html url which is handled by the 'html_url' field of the event. This commit thus try as before to build a GitHubRepositoryName from the 'url' field ; if that fails, as a fallback it also tries the 'html_url' field. See also https://github.community/t5/GitHub-API-Development-and/consistency-of-repository-url-between-event-types/td-p/21209 for some explanations.
Contributor
Author
|
@KostyaSha modification done as as requested ; please look at latest push. Thx |
|
This should have printed it's message with Which would seem like it's the end of the road for this PUSH hook being processed. But, adding a custom logger and turning up the debug level, we can see this happening after: Which indicates that in-fact, we did in-fact successfully create a Unfortunately, builds still do not trigger on this path. But, this comment is only to suggest changing the log level here. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As documented in github API docs (https://developer.github.com/v3/repos/#response) the url field of the event should/could point to the API endpoint.
In the github-plugin it is expected to work on the public html url which is handled by the 'html_url' field of the event.
This commit thus try as before to build a GitHubRepositoryName from the 'url' field ; if that fails, as a fallback it also tries the 'html_url' field.
See also https://github.community/t5/GitHub-API-Development-and/consistency-of-repository-url-between-event-types/td-p/21209 for some explanations.
This change is