github-plugin icon indicating copy to clipboard operation
github-plugin copied to clipboard

[JENKINS-56830] consistency between 'repository.url' and 'repository.html_url' in push webhook payload

Open jenkins-infra-bot opened this issue 6 years ago • 0 comments

as stated in the github API documentation, the payload of a repository object https://developer.github.com/v3/repos/#response should contain in the 'url' field an URI pointing to the repository itself at the API level.

Probably for historical reasons, the content of the 'repository.url' field sent from the github.com API is wrong.

Servers that comply more strictly to the API documentation send int the field 'repository' a value pointing to the API URI of the repository leading in failures while reading the webhook event payload

Apr 01, 2019 9:30:40 AM INFO org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEventReceived PushEvent for http://gitbucket.my.pc/api/v3/repos/root/demo-ci-jgitver-maven-plugin from 127.0.0.1 ⇒ http://jenkins.my.pc:8090/github-webhook/
Apr 01, 2019 9:30:40 AM WARNING com.cloudbees.jenkins.GitHubRepositoryName createCould not match URL http://gitbucket.my.pc/api/v3/repos/root/demo-ci-jgitver-maven-plugin
Apr 01, 2019 9:30:40 AM WARNING org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEventMalformed repo url http://gitbucket.my.pc/api/v3/repos/root/demo-ci-jgitver-maven-plugin

In `DefaultPushGHEventSubscriber` the field 'repository.html_url' could be used as a fallback in case the field 'repository.url' cannot be interpreted.

 

 


Originally reported by mcfoggy, imported from: consistency between 'repository.url' and 'repository.html_url' in push webhook payload
  • assignee: lanwen
  • status: Open
  • priority: Minor
  • component(s): github-plugin
  • label(s): github-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 0
  • imported: 2025-12-08
Raw content of original issue

as stated in the github API documentation, the payload of a repository object https://developer.github.com/v3/repos/#response should contain in the 'url' field an URI pointing to the repository itself at the API level.

Probably for historical reasons, the content of the 'repository.url' field sent from the github.com API is wrong.

Servers that comply more strictly to the API documentation send int the field 'repository' a value pointing to the API URI of the repository leading in failures while reading the webhook event payload

Apr 01, 2019 9:30:40 AM INFO org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEventReceived PushEvent for http://gitbucket.my.pc/api/v3/repos/root/demo-ci-jgitver-maven-plugin from 127.0.0.1 ⇒ http://jenkins.my.pc:8090/github-webhook/
Apr 01, 2019 9:30:40 AM WARNING com.cloudbees.jenkins.GitHubRepositoryName createCould not match URL http://gitbucket.my.pc/api/v3/repos/root/demo-ci-jgitver-maven-plugin
Apr 01, 2019 9:30:40 AM WARNING org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEventMalformed repo url http://gitbucket.my.pc/api/v3/repos/root/demo-ci-jgitver-maven-plugin

In `DefaultPushGHEventSubscriber` the field 'repository.html_url' could be used as a fallback in case the field 'repository.url' cannot be interpreted.

 

 

environment
jenkins-2.164.1<br/>
github-plugin-1.29.4

jenkins-infra-bot avatar Apr 01 '19 08:04 jenkins-infra-bot