Is there a Jenkins plugin for creating pull requests?
Suppose I am running a Jenkins job on some feature branch. If this job is successful, then I want Jenkins to automatically create a pull request from this feature branch.
There is a command-line way to create pull requests:
git request-pull [-p] <start> <url> [<end>]
but I haven't been able to find a way to get Jenkins to automate the task.
Your Jenkins job can have a step calling the Atlassian Stash API for creating a pull request
POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests?direction&at&state&order&withAttributes&withProperties
Create a new pull request between two branches. The branches may be in the same repository, or different ones. When using different repositories, they must still be in the same
{@link Repository#getHierarchyId() hierarchy}
.The authenticated user must have
REPO_READ
permission for the "from
" and "to
" repositories to call this resource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With