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

Do not detect renamed GitHub repos under the old name (bonus points if job can be renamed when rename detected)

      If a Github repo is renamed, due to the fact that Github supports repository redirects (which doesn't seem possible to disable) Jenkins will create a repository and trigger a build for a repo under the old name and under the new name as well.

      Re-scanning the old repo name does not cause it to be removed.

      https://developer.github.com/changes/2015-07-21-automatic-redirects-for-renamed-repositories/

      This is problematic as it can confuse users and also trigger duplicate builds under the new and old repo names.

      Github branch source plugin 2.2.3

      Github API plugin 1.86

          [JENKINS-46068] Do not detect renamed GitHub repos under the old name (bonus points if job can be renamed when rename detected)

          Simon Wydooghe added a comment - - edited

          philw_bench You can delete the job directory and reload the Jenkins configuration for now I think. Still a pain in the ass

          Simon Wydooghe added a comment - - edited philw_bench You can delete the job directory and reload the Jenkins configuration for now I think. Still a pain in the ass

          Phil Whelan added a comment -

          Thanks simonwydooghe! My solution was to exclude the names via the regex setting for this plugin.

          Phil Whelan added a comment - Thanks simonwydooghe ! My solution was to exclude the names via the regex setting for this plugin.

          If you don't care about the history, you can do this:

          1. Rename the repository 'original' to 'classic' in github.
          2. Create a new repository 'original'
          3. Delete the (empty) repository 'original'

          This deletes the redirect.

          It's a crappy workaround and loses the history.

          Christian Höltje added a comment - If you don't care about the history, you can do this: 1. Rename the repository 'original' to 'classic' in github. 2. Create a new repository 'original' 3. Delete the (empty) repository 'original' This deletes the redirect. It's a crappy workaround and loses the history.

          Under the covers, the plugin should be using the repository ID for tracking, not the name. The name is changeable, but the ID isn't.

          Christian Höltje added a comment - Under the covers, the plugin should be using the repository ID for tracking, not the name. The name is changeable, but the ID isn't.

          Avadh Sharma added a comment -

          I'm also seeing this. Any fix planned?

          Avadh Sharma added a comment - I'm also seeing this. Any fix planned?

          Pierre Beitz added a comment -

          Seeing the issue, although no new build is triggered on the old job anymore. I believe this is still the same issue though, part of it was fixed somehow since this bug was reported.

          Pierre Beitz added a comment - Seeing the issue, although no new build is triggered on the old job anymore. I believe this is still the same issue though, part of it was fixed somehow since this bug was reported.

          Jose Blas Camacho Taboada added a comment - - edited

          This issue is already fixed in version 2.5.3

          Jose Blas Camacho Taboada added a comment - - edited This issue is already fixed in version 2.5.3

          James Nord added a comment -

          and yet nothing in the release notes for 2.5.3?

          James Nord added a comment - and yet nothing in the release notes for 2.5.3?

          We're on 2.6.0 and still experiencing this issue. jtaboada could you please share some more info around this?

          Andreas Nygard added a comment - We're on 2.6.0 and still experiencing this issue. jtaboada could you please share some more info around this?

          We are still experiencing this issue on the latest version of the plugin, with the same criteria as in the description.

          Can you please advise how this should be triaged?

          Andreas Nygard added a comment - We are still experiencing this issue on the latest version of the plugin, with the same criteria as in the description. Can you please advise how this should be triaged?

            Unassigned Unassigned
            jhovell John Hovell
            Votes:
            7 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated: