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

Github team slug filter is ignored on scan triggered by hook

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have several GitHub organization folders, pointing to the same github organisation, but filtered by team slug.

      On scan, this works fine, only the repositories owned by the team are added to the folder.

       

      However, on trigger by a web-hook, the repository is added regardless of the team slug filter

       

      Having tested with repository name based filters, this does not happen.

       

      Hypothesis : the team slug is not present in the hook data, and thus is ignored by the filter

        Attachments

          Issue Links

            Activity

            Hide
            bitwiseman Liam Newman added a comment -

            Kunal Nanda
            If you have time to submit a PR with changes that would be great help.

            Show
            bitwiseman Liam Newman added a comment - Kunal Nanda If you have time to submit a PR with changes that would be great help.
            Hide
            damien_coraboeuf Damien Coraboeuf added a comment -

            Hi, we are currently migrating 500+ repositories to GitHub and the team filter would be a life saver. The fact that repositories become somehow registered through the hook is indeed very bothering. My current workaround would be to get the list of repositories for a team and to rely only on an allowed list of repositories.

            I had a look at the code to see if I could contribute a fix but it's pretty difficult to know where to start If I understand the issue as described above, the hook would have to take into account the team parameter? Do you know where I could look for the GitHub hook code?

            Show
            damien_coraboeuf Damien Coraboeuf added a comment - Hi, we are currently migrating 500+ repositories to GitHub and the team filter would be a life saver. The fact that repositories become somehow registered through the hook is indeed very bothering. My current workaround would be to get the list of repositories for a team and to rely only on an allowed list of repositories. I had a look at the code to see if I could contribute a fix but it's pretty difficult to know where to start If I understand the issue as described above, the hook would have to take into account the team parameter? Do you know where I could look for the GitHub hook code?
            Hide
            kernal119 Kunal Nanda added a comment -

            Hi Damien Coraboeuf/Liam Newman, we have been in touch with Cloudbees and looks like they will be putting in a fix soon. This bug is a deal breaker for us. Hopefully something will be pushed in the next few days.

            Show
            kernal119 Kunal Nanda added a comment - Hi Damien Coraboeuf / Liam Newman , we have been in touch with Cloudbees and looks like they will be putting in a fix soon. This bug is a deal breaker for us. Hopefully something will be pushed in the next few days.
            Hide
            damien_coraboeuf Damien Coraboeuf added a comment -

            Thanks for the feedback Kunal Nanda, looking also forward for a fix. If not, we'll revert to use allow lists of repositories computed from teams, but it'll be more cumbersome of course.

            Show
            damien_coraboeuf Damien Coraboeuf added a comment - Thanks for the feedback Kunal Nanda , looking also forward for a fix. If not, we'll revert to use allow lists of repositories computed from teams, but it'll be more cumbersome of course.
            Hide
            bitwiseman Liam Newman added a comment -

            I work at CloudBees, so that's how this got on my schedule.

            This change has been merged and will be in the next release within a week.
            The incremental build is available if you want to try it out before then.

            Show
            bitwiseman Liam Newman added a comment - I work at CloudBees, so that's how this got on my schedule. This change has been merged and will be in the next release within a week. The incremental build is available if you want to try it out before then.

              People

              Assignee:
              bitwiseman Liam Newman
              Reporter:
              enys Edward Nys
              Votes:
              8 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: