1

I am working on automating the code review process in my team.

My objectives are:

  1. When a review is created, assign it to two random developers
  2. Automatically update the JIRA item, and assign them to the developers who were assigned as reviewers in Upsource

I was able to achieve objective #1 using Upsource Custom Workflows.

For the second objective, I have tried looking at Upsource Webhooks and JIRA Cloud REST API, but I fail to see how to assign a JIRA item from Upsource. JIRA's API specifies that in order to assign an item using REST, we need to create PUT request to this method:

PUT /rest/api/2/issue/{issueIdOrKey}/assignee

  • How can I create a PUT request from Upsource Webhooks?
  • How can I extract the {issueIDOrKey} from the originating Upsource review?
Vin Shahrdar
  • 1,151
  • 1
  • 12
  • 30

1 Answers1

0

How can I create a PUT request from Upsource Webhooks?

Upsource webhooks send only POST requests at the moment. But I don't see how this limitation is blocking your task, because as I understand there has to be a service that'll translate Upsource payload to JIRA payload. That service should make a PUT request.

How can I extract the {issueIDOrKey} from the originating Upsource review?

Upsource provides an API for this. getReviewDetails method allows to get a list of issues associated with a given review (see this message spec).

Maxim
  • 52,561
  • 27
  • 155
  • 209