How can we capture the tensile request created in the cloud bitpack

I am writing a shell script that should run when a Pull request is created in Bitbucket. My question is what are the ways to capture a Pull request. At the moment, I have found two ways.

1) Create a hook plugin in the bitpack that captures the retrieval request.

2) Create a jenkins job and a corresponding plugin in jenkins that grabs the pull request and can run my shell script in build actions.

Is there any other way to capture a Pull request?

Thanks.

+5
source share
1 answer

Is there any other way to capture a Pull request?

Not really: you pointed out two general approaches:

  • push (webhook event click on the listener)
  • pull (BitBucket API request)

In the latter case, you would use the PR Rest resource API :

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests 
0
source

Source: https://habr.com/ru/post/1269568/


All Articles