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

reviewer parameter in pullrequest creation URL

akrey December 14, 2017

We were able (albeit undocumented) to prepopulate the bitbucket server pull request creation page with title, description and reviewers, with URL parameters title, description, reviewers like so (where name1/2 are the login names):

https://bitbucket.example.com/bitbucket/projects/proj/repos/sampe/pull-requests?create&title=ak+ecl+test&description=escaped_description&targetBranch=refs%2Fheads%2Fmaster&sourceBranch=refs%2Fheads%2Fak-ecl-test&reviewers=name1|!|name2

Since the upgrade to 5.x the prefilling of the reviewers part doesn't work anymore, and when using the |!| separator for multiple reviewers we even get a 400 response.

3 answers

0 votes
Kevin Daily
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!
March 11, 2024

Use the url encoding for the |!| delimiter:

 %7C%21%7C

 

0 votes
Chris Tapay July 24, 2018

Does someone know what are the query parameters supported by `pull-requests/new` endpoint? Thanks.

0 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2017

Hi Andreas,

What about using a REST API to achieve this?

 

The following one (using the POST method) allows specifying the reviewers:

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


See the REST end point documentation here.

 

Caterina

akrey December 15, 2017

We already so that. Well, actually we use a self-written plugin so we can use ssh instead of http, and thus the same auth that is used for pushing.

But this is about prefilling the web page, and then allowing people to edit that to their needs.

Ronald Troyer April 30, 2018

@Caterina Curti, @akrey, Yeah, I've found this super annoying as well.

For example:

https://{repo_url}/pull-requests?create&targetBranch={targetBranch}&sourceBranch={sourceBranch}&reviewers={user_id}|!|{user_id}

will have their user names flash in the reviewers input, but almost instantly get cleared out.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events