Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket Pull Request ID

Galit Oshri
Contributor
September 18, 2023

Hi,

Is there any option to set the Pull Request ID to be unique for entire project that way we would not have same pull request IDs in 2 different repositories.

for example: repository 1 and repository 2, both have Pull request 2 - i need that the pull request will be unique

Thanks,

Galit

 

1 answer

1 vote
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 18, 2023

Hi Galit,

it's Ulrich again :)

The quick answer is no - pull request ids across repositories are not unique.

May I use why you need a unique PR id?

I know that the repo id is absolutely unique in the instance across all projects and repos. I suggest you create a combined 'id' or hash that includes both the repo id and the pr id - which will give you a unique reference, like "<repo_id>:<pr_id>". If you search for particular pull request globally, you can look up the repo by id and then the pr by id.

Hope that helps

Cheers Ulrich

// Izymes

Galit Oshri
Contributor
September 19, 2023

Hi Ulrich,

Our CI is using the pull request ID as a TeamCity trigger. 

Our CI includes builds from more than one repository.

Duplicate pull request ID will run the wrong build.

for example, repository A and repository B.

repository A has changes in pull request 10, repository B has different changes with same pull request 10. 2 different changes will run together (TeamCity will checkout the pull request ID for both repositories)

Thanks,

Galit 

Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 19, 2023

Do I understand correctly Bitbucket is sending a webhook notification to TeamCity to trigger a build? The event payload should contain all the necessary details you need to identify the correct pull request. Have you talked to team city support on how to trigger the correct build for the event payload?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events