Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56830

consistency between 'repository.url' and 'repository.html_url' in push webhook payload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • github-plugin
    • jenkins-2.164.1
      github-plugin-1.29.4

      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.

       

       

            lanwen Kirill Merkushev
            mcfoggy Matthieu Brouillard
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: