Hi
I am using oauth2 with client key and secret and want to create PR with author (some other user)
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-post
This end point creates PR and set PR owner/author based on my authenticated account username but I want PR owner/Author that I set in "author" parameter.
Hey @mohan yadav ,
thank you for reaching out!
As stated in the Create a pull request endpoint documentation you have linked, the author of the pull request created by using that endpoint will be the authenticated user or the request :
Creates a new pull request where the destination repository is this repository and the author is the authenticated user.
So, it will select the author solely based on the authentication credentials and not on the content of the payload of the request.
Could you share with us more details about your use case to create a pull request on another user's behalf?
Thank you, @mohan yadav !
Patrik S
@Patrik S we built a system where user adds their selected remote git/bitbucket files from a feature branches into build( user can add multiples feature branch items/files into a single build) and our system check for PR conflicts, approver and merge the PR) an and finally all PR checks our system deploy added file into target DB.
So we want PR owner who added specific file so that they can receive email about PR comment, approval, denied etc action .
So as per API parameter it should save Author details as a owner of PR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @mohan yadav ,
thank you very much for sharing your use case with us.
I went ahead and created a feature request with our development team for that API endpoint to consider the Author from the payload, instead of just the authenticated user:
I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.
Thank you, @mohan yadav .
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.