GitHub 拉取请求模板:获取当前分支名称

GitHub pull request template: get current branch name

我正在为我的存储库创建拉取请求模板。

我按照 https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/ 中的说明添加了一个新文件,现在我希望它的主体包含使用当前分支名称(拉取请求分支名称)生成的字符串。

无法在 GitHub 的文档中找到答案,想知道是否可行,如果可行,如何实现?

我在推特上发了问题:"is there a way to get the current branch name in a pull request template?"

提到 GitHub 帐户,这是我得到的答案:

No, there currently isn't but if this is something you want included in all pull request submissions, you might want to check out Probot: https://probot.github.io . I recently created https://github.com/probot/view-rendered … that edits the pull request body to add rendered links for docs.

Link 推文:https://twitter.com/korndaniel1/status/1022468460226469888