how to create pull request if jenkins job running on feature branch is successful

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.

  • Go, go get, go install, local packages, and version control
  • How specify new path for git hooks directory?
  • Make Git not track all branches
  • How can I easily apply a bugfix on several release branches in Git?
  • Git, pushing to remote
  • Can git format patch so it can be used with patch program?
  • 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.

  • X session in Git Bash on Windows?
  • JGitFlow maven plugin doesn't push release branch to remote
  • Can git apply leave conflict markers inline like git rebase?
  • Making git checkout play nicely with filewatchers
  • push error: master: master
  • How to import git project into Xcode 8?
  • 2 Solutions collect form web for “how to create pull request if jenkins job running on feature branch is successful”

    It is more typical to go the other way: users choose when they are ready to create a pull request, and Jenkins (or any other CI tool) updates the status of the pull request based on the project build result. For example, if you use the GitHub Pull Request Builder, then Jenkins will send a message to GitHub when the project build starts and can close the pull request automatically if the build fails.

    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.

    Git Baby is a git and github fan, let's start git clone.