[JENKINS-75544] fix(webhook): use repo.html_url
instead of repo.url
#404
+5
−20
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.url
to be an API URLrepo.html_url
repo.html_url
as a fallback; I'm not sure why the fallback wasn't working exactly, but it should now always userepo.html_url
Misc 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