Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-26281

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

      Issue Summary

      The pull_request_review_comment event was configured by DVCS after linking the GitHub account successfully.

      When reviewer add a comment in the pull request from Github, it will trigger a webhook to Jira.

      DVCS Github integration webhook triggered by pull_request_review_comment event results in 422 code responses.

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Integrate Jira with Github (this guide can be used to establish the integration
      2. Go to âš™ > System > Logging & Profilling
        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
          
      1. Modify any file in the repository.
      2. Create a new commit for the changes in a new branch.
      3. Then create a new pull request.
      4. Open the pull request and click the "Commits" tab to view the commit changes. 
      5. Click "+" inside the code changes and click "Start Review". 
      6. Click "Finished your review" and add some comments in the box. Then, "Submit Review". This step submission will trigger the pull_request_review_comment event
      7. Go to Settings > Hooks/Webhooks > Edit the pull request webhooks. Then, look for the "Recent Deliveries" section to find the request and response sent by the webhooks that returned 422 error code.
      8. Cross-check the application log, you will get the following loggings:
        2025-01-23 10:43:44,006+0000 http-nio-8080-exec-9 url: /jira/rest/bitbucket/1.0/webhook/github DEBUG anonymous 643x663x1 - 10.227.29.169,172.50.0.2 /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Received GitHub pull_request_review_comment event
        2025-01-23 10:43:44,008+0000 http-nio-8080-exec-9 url: /jira/rest/bitbucket/1.0/webhook/github DEBUG anonymous 643x663x1 - 10.227.29.169,172.50.0.2 /rest/bitbucket/1.0/webhook/github [c.a.j.p.dvcs.service.RepositoryServiceImpl] Finding repository with URL [https://github-90551.prod.atl-cd.net/Atlassian/test] for organization [1]
        2025-01-23 10:43:44,014+0000 http-nio-8080-exec-9 url: /jira/rest/bitbucket/1.0/webhook/github DEBUG anonymous 643x663x1 - 10.227.29.169,172.50.0.2 /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Event type pull_request_review_comment not supported, dropping

      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 pull_request_review_comment events
      2. The pull request webhook will result with 422 response with this line in the logs Event type pull_request_review_comment not supported, dropping:
        2025-01-23 10:43:44,014+0000 http-nio-8080-exec-9 url: /jira/rest/bitbucket/1.0/webhook/github DEBUG anonymous 643x663x1 - x.x.x.x,y.y.y.y /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Event type pull_request_review_comment not supported, dropping
        

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            [JSWSERVER-26281] DVCS Github integration webhook triggered by pull_request_review_comment event results in 422 code response

            There are no comments yet on this issue.

              Unassigned Unassigned
              ckimloong John Chin
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated: