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,462,669
Community Members
 
Community Events
176
Community Groups

Merge Pull Request via 2.0 REST API

Hi All,

I have an access token with all permission, however, I cannot merge a pull request via REST API with this token. The error prompt is as follows.

> Merging a pull request requires write access to the destination branch

 

The REST API totally follows the official documents

In addition,  I have verified my repo's branch restriction which is no any rule.

1 answer

1 accepted

0 votes
Answer accepted

Hi @CT Wu and welcome to the community!

Could you please provide the following info, so we can better help you?

1) Is this a PR between two branches in the same repo? Or is it a PR from a forked repo to the parent of the fork?

2) What kind of token are you using?

  • Is it a token generated from an OAuth consumer?
  • Is it an Access token generated from Repository settings > Access tokens for this repo, on Bitbucket Cloud website?
  • Or is it an app password generated for your account from https://bitbucket.org/account/settings/app-passwords/ ?

Kind regards,
Theodora

Hi @Theodora Boudale ,

1. Two branches in the same repo owned by me.

2. Repository settings > Access tokens for this repo, on Bitbucket Cloud website, plus all permissions are checked.

Hi @CT Wu,

Thank you for the info. There was a bug preventing a merge via API using a repository access token, we had a public bug report about this here:

The bug was fixed a few hours ago.

Could you please try running the API call again now and let me know if it works?

Kind regards,
Theodora

Hi @Theodora Boudale ,

I have verified, and it works.

Thanks.

That's good to hear, thank you for the update.

Please feel free to reach out if you ever need anything else!

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events