How receive hook from Bitbucket on JIRA and process this hook data?

I can't figure out how to properly create a hook listener from Bitbucket to JIRA.

As I can see:

1) There is a branch in Bitbucket

2) A commit is added to the branch and a Pull Request is created.

3) The reviewer clicks Approve at Pull Request and at this moment a change in the status of the task should occur in JIRA, which in one of the fields contains the name of the branch

I understand how to send a hook from BitBucket, but how to get a hook and process it in JIRA

I do not understand how to implement this, have any ideas?

1 Answers

tCode On Best Solutions

I figured it out, it's simple via WebHooks
I used the plugin JIRA Automation

  1. Bitbucket sends the hook to the JIRA with the transfer of the secret (basic authorization);
  2. JIRA gets the hook and processes the hook using the plugin
  3. JIRA then sends a request to TeamCity to build a specific branch using a plugin;
  4. TeamCity is building a specific branch and sends the hook to JIRA, and JIRA processes the hook from the TeamCity and performs the actions