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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,605
Community Members
 
Community Events
176
Community Groups

API v2 how to get the list of pull requests that a commit is part of?

I saw this question for the API v1, but not for v2

 

I am trying to make this very basic http request but I get a "resource not found error". The API docs say that I must install the Pull Request Commit Links app, but I see no such app on the marketplace 

 

2 answers

1 accepted

1 vote
Answer accepted

Hi @Esteban Vargas,

You can use the following endpoint:


Please follow the steps below in order to install the Pull Request Commit Links app first:

  1. Open the repository in Bitbucket Cloud website

  2. Select the Commits page of the repo, and then select the commit hash of a commit that is part of a PR in that repo

  3. While viewing the commit details, look at the info on right side of the page. You will see there a link Pull requests, like in the screenshot below:

    Screenshot 2022-12-30 at 15.05.11.png

  4. Select that link and the Pull Request Commit Links app will be installed.

You only need to do this once for a specific workspace, and then please try running the API call again.

In case you still have issues, could you please provide the API call you are running and the full output? Make sure to sanitize any private/sensitive data in the call prior to sharing it here.

Kind regards,
Theodora

Thanks! This works. 

 

Following the steps to install Pull Request Commit Links you outlined solved this issue for us! I think that should be included on the docs

 

And second, the docs also need a small update: The docs say this endpoint doesn't need a Bearer token, but it does

Hi Esteban,

It's good to hear that the issue has been solved!

Would you mind telling me where exactly you saw that this endpoint doesn't need authentication? Accessing any private content always requires authentication.

The instructions on how to install the app are included in the doc, although not in as much detail as my previous post. I will reach out to the team that maintains this doc to improve it.

Kind regards,
Theodora

0 votes
edalel I'm New Here Dec 27, 2022

I found in that same page, in the "List pull requests that contain a commit" part that:
Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.

From what I understand this is now a built-in feature on Bitbucket Cloud, and that's why there's no such app on the Marketplace anymore. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events