Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a hook, that calls an API upon creation of a pull request?

Ishan Vyas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2018

I need a hook (don't know if it will be post or pre) to call an XL release API to trigger a build when a pull request is created.

I have never created a hook before. Please advise.

1 answer

0 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2018

Hi @Ishan Vyas,

 

Are you using Bitbucket Server (the self-hosted version) or bitbucket.org (the Atlassian Saas offering)?

 

If you are using Bitbucket Server, you can use the "Pull request - Opened" webhook (see Pull request events - opened for the details of the payload.

 

Webhooks have been added to Bitbucket Server as part of the 5.4 release and the detailed documentation can be found here:

Bitbucket Server 5.4 release notes

Managing webhooks in Bitbucket Server

 

Cheers,

Caterina - Atlassian

Ishan Vyas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 26, 2018

Hello Caterina, 

I am using the BitBucket server version 5.2.3 and I do not see the webhooks option on my admin panel.
 

Is there anyway to do this on this version or is upgrading to 5.4 the only way?

Thank You.

Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2018

Hi @Ishan Vyas,

 

An upgrade to Bitbucket Server 5.4 or higher is required to enable this feature.

 

Are you able to perform the upgrade or ask an admin to do it?

 

Cheers,

Caterina

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events