如何使用 Bitbucket Pipeline 为同一存储库打开新的 Bitbucket Pull Request?
(包括发布 PR 描述消息和推送以创建 PR 的源分支,或者在该分支过时时更新该分支。)
我的组织发布了一个管道来做到这一点。
因为我们离开了 Bitbucket,原始源代码被删除,docker 镜像正在慢慢老化废弃软件。但它应该仍然有效。
使用就像
pipelines:
custom:
create-pull-request:
- step:
name: Create pull-request
script:
- pipe: docker://calidae/bitbucket-pipe-pull-request
variables:
BITBUCKET_CLIENT_ID: $BITBUCKET_CLIENT_ID #(1)
BITBUCKET_CLIENT_SECRET: $BITBUCKET_CLIENT_SECRET #(1)
TITLE: "Example title" #(2)
BRANCH: example/my-branch #(3)
# TARGET_BRANCH: master #(4)
# REVIEWERS: '[{"username":"jane"}]' #(5)
# ...
否则,请编写自己的脚本来使用 API,请参阅 https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-post