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

webhook is not registering on creation

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      the plugin does not seem to be registering the webhook when i create a new project.

      i have the 'manage hooks' checkbox checked in the github plugin section and the webhook does register if i click 'register for all projects', but i need this to be automatically get up when the project gets created.

        Attachments

          Issue Links

            Activity

            Hide
            jgangemi Jae Gangemi added a comment -

            i spent some time looking into this and i don't see any way in the current implementation this can be accomplished.

            is there some way to get a reference to the Job object(s) that are created once the scan completes? from there all that should be required (i think) is to get a reference to com.cloudbees.jenkins.GitHubWebHook and call registerHookFor passing it the Job object(s).

            Show
            jgangemi Jae Gangemi added a comment - i spent some time looking into this and i don't see any way in the current implementation this can be accomplished. is there some way to get a reference to the Job object(s) that are created once the scan completes? from there all that should be required (i think) is to get a reference to com.cloudbees.jenkins.GitHubWebHook and call registerHookFor passing it the Job object(s).
            Hide
            bksaville Brian Saville added a comment -

            This could be done in the factory class, but that isn't github specific. It may be possible to use a branch property as well, but that seems overkill. I'm not sure of a good way to tie into the job creation process currently, but I'm sure I don't know about something...

            Show
            bksaville Brian Saville added a comment - This could be done in the factory class , but that isn't github specific. It may be possible to use a branch property as well, but that seems overkill. I'm not sure of a good way to tie into the job creation process currently, but I'm sure I don't know about something...
            Hide
            jgangemi Jae Gangemi added a comment -

            i don't see anywhere that provided access to the Job class unless it's in AbstractWorkflowBranchProjectFactory.

            i will try to dig around a bit more on this over the weekend. i'm really hoping one of the maintainers can respond and offer some direction, insight.

            Show
            jgangemi Jae Gangemi added a comment - i don't see anywhere that provided access to the Job class unless it's in AbstractWorkflowBranchProjectFactory . i will try to dig around a bit more on this over the weekend. i'm really hoping one of the maintainers can respond and offer some direction, insight.
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Merging this with JENKINS-37845

            Show
            stephenconnolly Stephen Connolly added a comment - Merging this with JENKINS-37845

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jgangemi Jae Gangemi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: