DVCS Github integration webhook triggered by issue_comment event results in 422 code response

XMLWordPrintable

    • 8.2
    • 3
    • Severity 2 - Major
    • 19

      Issue Summary

      DVCS Github integration webhook triggered by issue_comment event results in 422 code response.

      The cause of this issue is pre-selected "issue_comment" trigger in the webhook definition that comes up upon integrating Jira with Github. This event should not be used at all.

      Steps to Reproduce

      1. Integrate Jira with Github (this guide can be used to establish the integration
      2. Go to ⚙ > System > Log and profiling
        1. Click on "Configure logging level for another package."
        2. Add the following packages separately, select "DEBUG" for the "Logging Level"
          com.atlassian.jira.plugins.dvcs
          com.atlassian.jira.plugin.devstatus
          
      3. Create a new branch and then pull request, so that this change appears on the linked Jira ticket

      Expected Results

      1. Github will create two webhooks: one for push events and the second one for pull request events
      2. Sent webhook requests will result in OK response

      Actual Results

      1. Github will create two webhooks: one with push event, and other one with pull requests and issue_comment events
      2. The pull request webhook will result with 422 response, which is unexpected:

      Debugging packages will log the issue_comment event is dropped, as it is not supposed to be triggered:

      2022-05-12 07:45:16,405+0000 http-nio-8080-exec-118 url: /rest/bitbucket/1.0/webhook/github DEBUG anonymous 465x1574278x6 - xxx.xxx.xxx.xxx,yyy.yyy.yyy.yyy,127.0.0.1 /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Received GitHub issue_comment event
      2022-05-12 07:45:16,406+0000 http-nio-8080-exec-118 url: /rest/bitbucket/1.0/webhook/github DEBUG anonymous 465x1574278x6 - xxx.xxx.xxx.xxx,yyy.yyy.yyy.yyy,127.0.0.1 /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Event type issue_comment not supported, dropping
      

      Workaround

      1. In Github, select your repository > Settings > Webhooks
      2. Edit the webhook with events issue_comment, pull_request and pull_request_review_comment
      3. Remove "Issue comments" event and update the webhook

            Assignee:
            Unassigned
            Reporter:
            Marko Filipan (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: