From 7a643a07114726f9bb3177e6fbbd6d663711fcdd Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 24 Feb 2017 10:22:58 +0000 Subject: [PATCH] Comment the return args on getWebhook --- .../matrix-org/go-neb/services/jira/webhook/webhook.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go b/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go index ff15f7f..edc9417 100644 --- a/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go +++ b/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go @@ -155,6 +155,9 @@ func createWebhook(jrealm *jira.Realm, webhookEndpointURL, userID string) error return err } +// Get an existing JIRA webhook. Returns the hook if it exists, or an error along with a bool +// which indicates if the request to retrieve the hook is not 2xx. If it is not 2xx, it is +// forbidden (different JIRA deployments return different codes ranging from 401/403/404/500). func getWebhook(cli *gojira.Client, webhookEndpointURL string) (*jiraWebhook, bool, error) { req, err := cli.NewRequest("GET", "rest/webhooks/1.0/webhook", nil) if err != nil {