[JENKINS-75544] fix(webhook): use repo.html_url instead of repo.url#404
Merged
KostyaSha merged 3 commits intojenkinsci:masterfrom May 5, 2025
Merged
[JENKINS-75544] fix(webhook): use repo.html_url instead of repo.url#404KostyaSha merged 3 commits intojenkinsci:masterfrom
repo.html_url instead of repo.url#404KostyaSha merged 3 commits intojenkinsci:masterfrom
Conversation
- Per https://github.blog/changelog/2025-04-07-changes-to-the-repository-object-in-push-webhook/, GitHub now gives an API URL in the push webhook's payload for `repo.url` - update the test payload to account for this - switch the code to instead use `repo.html_url` - previously jenkinsci@c0c83fb added `repo.html_url` as a fallback; I'm not sure why the fallback wasn't working exactly, but it should now _always_ use `repo.html_url`
- saw this and wanted to change it, but I forgot 😅
- add a commit with the JIRA issue # since the PR name doesn't seem to auto link? - (last time I used JIRA, any mention of it the issue number in a GitHub PR would auto link; possibly different settings for this repo/the Jenkins org)
This was referenced Apr 28, 2025
Contributor
Author
|
@KostyaSha any chance you could review this? It appears to be blocking a number of people due to a recent GH change. |
Member
|
lets try this change |
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.
Summary
Per https://github.blog/changelog/2025-04-07-changes-to-the-repository-object-in-push-webhook/, GitHub now gives an API URL in the push webhook's payload for
repo.url, so the code should be adjusted to handle thisDetails
repo.urlto be an API URLrepo.html_urlrepo.html_urlas a fallback; I'm not sure why the fallback wasn't working exactly, but it should now always userepo.html_urlMisc Notes / backstory
I stumbled upon this via a question I happened to see on Stack Overflow's Staging Ground, which I suspected was a bug (and not something the asker could fix) due to the recent breaking change from GitHub. I was able to find an existing JIRA issue on the problem and so answered the question by linking to ticket.
Seemed like a straightforward fix, so I decided to take a look myself after I saw it hadn't received a fix in a week or so.
I'm otherwise a first-time Jenkins contributor, just coincidentally stumbled upon this
Testing done
Submitter checklist