使用 Eclipse 将更改提交到 github 时如何返回拉取请求 url

问题描述 投票:0回答:1

当我从 eclipse 将一个新分支推送到 GitHub 时,输出中会显示一个 URL,可以复制该 URL 以快速打开一个新的拉取请求。

新提交推送到现有分支时是否可以获取此 url?如果可能,Eclipse 或 github 存储库中的相应配置是什么?

任何帮助表示赞赏。

git eclipse pull-request
1个回答
0
投票

URL 应始终遵循该模式

https://github.com/my-username/my-repo/pull/new/my-branch-name

不应该和Eclipse挂钩,只是挂在GitHub期待开新PR的地方

或者,在这个要点中看到的更多细节:

https://github.com/$to_user/$repo/pull/new/$to_user:$to_branch...$from_user:$from_branch

OP Dom RC在评论gh pr create

中指出作为获取PR创建过程生成的URL的方法。

例子:

# Create a pull request using flags
~/Projects/my-project$ gh pr create --title "Pull request title" --body "Pull request body"
http://github.com/owner/repo/pull/1
© www.soinside.com 2019 - 2024. All rights reserved.