From 183be61344f2ac520a76dc953b6fc3d321e8fd91 Mon Sep 17 00:00:00 2001 From: Hutson Betts Date: Thu, 7 May 2020 11:54:20 -0500 Subject: [PATCH] docs(github-app): webhook correction Update GitHub App documentation to reflect that a GitHub App already has a built-in webhook that does not require creating a new webhook using the _Webhook_ permission. Furthermore, to take advantage of that built-in webhook, events must be enabled on the App's _Permissions_ page. Otherwise, if you wanted to use a separate webhook created by Jenkins using the credentials of the GitHub App, you would need to enable the _Admin_ permission, or else you would get the following error and no webhook: ``` Failed to add GitHub webhook for GitHubRepositoryName[host=github.example.com,username=test,repository=test] java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.example.com,username=test,repository=test] at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:231) at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:179) at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:175) ``` --- docs/github-app.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/github-app.adoc b/docs/github-app.adoc index 9c31da02e..dfcdb019e 100644 --- a/docs/github-app.adoc +++ b/docs/github-app.adoc @@ -50,8 +50,8 @@ Permissions this plugin uses: - Contents: Read-only (to read the `Jenkinsfile` and the repository content during `git fetch`). You may need "Read & write" to update the repository such as tagging releases - Metadata: Read-only - Pull requests: Read-only -- Webhooks (optional) - If you want the plugin to manage webhooks for you, Read and Write +Under _Subscribe to events_, enable all events. Click 'Create GitHub app'