列出git/stash pull分支请求

Tan*_*cho 2 git bitbucket bamboo bitbucket-server

我正在制作一个完整的Atlassian套件,jira stash/git和bamboo.

有谁知道是否有办法列出我当前分行的PR?

如果我当前的分支有一个打开的PR,我需要从shell中找到它,如果存在,则找到它的ID.无需创建pr,因为这将由开发人员完成.欢迎任何建议.

小智 9

使用以下方法获取Bitbucket/Stash的公开拉取请求:

$ git fetch origin 'refs/pull-requests/*:refs/remotes/origin/pull-requests/*'
Run Code Online (Sandbox Code Playgroud)

检查当前分支上的pull请求:

$ git branch --all --contains
  remotes/origin/pull-requests/31/from
  remotes/origin/pull-requests/31/merge
Run Code Online (Sandbox Code Playgroud)

清理:

$ git remote prune origin
Run Code Online (Sandbox Code Playgroud)