Reputation: 2310
I have a GitHub Organization account containing a repo I'm setting up for a multibranch pipeline. Along with the Organization account I have an empty GitHub account which belongs to the Organization. This empty account is used to set up any access tokens or GitHub credentials Jenkins may need.
I set up a web hook inside the repo for push, pull requests, and branch or tag creation events. Each logged Recent Delivery in GitHub for this web hook shows the pull request events were sent and received a 200 response.
Within BlueOcean, if I manually trigger a scan then all branches and PRs are recognized and built. But if I create a PR, this event is not automatically triggered or brought in by BlueOcean. Reading the logs in Jenkins I'm seeing the following message:
Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=ORGANIZATION,repository=PRIVATE_PROJECT]
java.lang.NullPointerException: There is no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=ORGANIZATION,repository=PRIVATE_PROJECT]
This is odd that it says there aren't any credentials with admin access as my personal access token has the following permissions:
Any clues?
Upvotes: 1
Views: 1693
Reputation: 2310
After a lot of headache, the issue turned out to be a bad webhook URL. We had a webhook URL that was previously set up for the Pull Request Builder (PRB) plugin and another webhook URL for other events.
I was setting the pull request triggers on the PRB webhook in GitHub. This was easily solved by marking the needed triggers on a webhook configured for our other URL.
Upvotes: 1