是否有用于创建 pull 请求的 Jenkins 插件?
假设我在某个功能分支上运行 Jenkins 作业。如果这项工作成功,那么我希望 Jenkins 自动从此功能分支创建 pull 请求。
有一种命令行方式可以创建 pull 请求:
git request-pull [-p] <start> <url> [<end>]
但我一直没能找到让 Jenkins 自动执行任务的方法。
最佳答案
您的 Jenkins 作业可以有一个步骤调用 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 - 如果在功能分支上运行的 Jenkins 作业成功,如何创建 pull 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34781993/