Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create Pull-Request task using REST api

Team

We are not in a position to install scriptrunner plugin and we need to add couple of tasks into all OPEN PRs using REST APIs. I'm unable to find any such API in the documentation.

Can you please help on this?

Thanks/Bijoy

3 answers

2 votes

The Bitbucket (Cloud) v2 APIs does not support this currently.

Someone created a feature request for that just recently, and I'd advise anyone that is interested in this kind of functionality to go vote for this issue or leave a comment about your specific use case.

0 votes

Hi Bijoy,

It is already possible to add tasks to Pull Requests by performing a POST against the /rest/api/1.0/tasks REST API end point (see related documentation).

 

You'll first need to retrieve a comment id to hook the task to. You can either retrieve one of the existing comments or create a new one.

Our developers added more details on this request.

Cheers,

Caterina - Atlassian Support 

Are there any plans to support PR comments+task creation in API v2?

Asking since API v1 will be deleted on Dec 31.

 

Thanks

Hi @Alexander Pirozhkov,

The REST APIs for Bitbucket Server already allow to create both tasks and comments on pull requests.

 

Are you using Bitbucket Server (self hosted) or bitbucket.org (hosted by Atlassian)?

 

The endpoints above are related to the Bitbucket Server product, I originally thought that's the one you are using because ScriptRunner is only available for the server version.

 

To clarify the difference and the deprecation of the API version 1.0 and version 2.0, this only applies to bitbucket.org.

 

Does this help?

 

Caterina

Hi @Caterina Curti, thanks for explaining! Now I see that original question was for Bitbucket Server.

But in my company we use Bitbucket Cloud and we have a good case for creating tasks and comments on pull requests. Cloud REST API 2.0 do not allow this so far. Would be awesome to know if any plans exist for providing this feature or even to see some roadmap for Bitbucket Cloud REST API.

Thank you

Hey @Alexander Pirozhkov,

I'm more familiar with Bitbucket Server but let me try.

 

The feature requests for bitbucket.org are tracked here:

https://bitbucket.org/site/master/issues

 

I can see a recent one (with a comment from us) regarding tasks here:

https://bitbucket.org/site/master/issues/15777/create-a-rest-api-to-retrieve-a-pull

 

I could not find one for comments and I can also see on the Bitbucket v2.0 API that there are no available end points for comments either.

 

Caterina

Thanks for quick reply, @Caterina Curti. Nice links, I will look around there! :)

It looks like this is supported now - https://github.com/atlassian-api/atlassian-python-api/blob/0142cdf24fffcbe9a0bb6c1a34ecf6966a4802c9/atlassian/bitbucket.py#L735

Edit: creating pull request is supported , not sure about task

apologies I misread the question

You might want to delete this, as its not actually relevant to the question.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

477 views 5 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you