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

Create pull request using command line or Jenkins

Hallo,

I am new to this community and this is my first post.

I am trying to create a Pull request through Jenkins in bitbucket server repo, at first place with a reviewer named e.g. Max.

Can anyone help me with this?

Is it also possible to create Pull request in bitbucket server repo using command line?

Thank You for your time.

1 answer

1 accepted

0 votes
Answer accepted
Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 07, 2019

Hi @Pratik Shah ,

Welcome to the community..!

if you want to create pull request from command line I would suggest you to consider API

THIS page has complete details of PR APIs with examples

Hope it helps you

 

BR,

Leo

Thank you very much for reply Leo.

Can you please provide me concrete example of how to use this API?

For e.g. my repo is https://xyz.com/bitbucket/projects/abc/repos/abxdgf

How can I create pull requets from feature/dfg branch to develop branch using command line?

 

Thank You once again.

BR,

Pratik

Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 07, 2019

Hi @Pratik Shah ,

I framed API call with given sample URL, you'll have modify URL, Project key and reponame in the call

curl -X POST -H "Content-Type: application/json" -u username:Password --basic https://xyz.com/bitbucket/rest/api/1.0/projects/abc/repos/abxdgf/pull-requests -d '{ "title": "PR Title Here", "description": "PR Description here", "fromRef": { "id": "feature/dfg", "repository": { "slug": "abxdgf", "name": null, "project": { "key": "abc" }}}, "toRef": {"id": "develop","repository":{"slug": "abxdgf", "name": null, "project": {"key": "abc"}}}}'

 

BR,

Leo 

@Leo .. Thank You very much.. That actually works and has made my life much easier.

One more question: Is it possible to create pull request in same way, but by passing source branch name in a variable?

 

With best regard's,

Pratik

Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 08, 2019 • edited

You can try it out but I didn't get a chance to play in that way 

Vivek Asthana
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!
Nov 21, 2023

Am getting illegal port number error while using these command..please guide

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events