关闭 GitHub 对非主分支的拉取请求的问题

Close issue on GitHub pull request to non master branch

我知道如何使用拉取请求消息关闭问题。 但这只有在目标分支是 master 时才会发生。

如果我想在合并到非主分支时关闭问题怎么办?

有可能吗?

从技术上讲,推送到 master 还是其他分支并不重要。重要的是你推送到 默认分支 ,默认为 master 但如果你有存储库管理员权限 can be changed

推送到非默认分支 does not close issues:

If the commit is in a non-default branch, the issue will remain open and the issue will be referenced with a tooltip.

应该可以使用 GitHub API 构建一些基于对多个分支的提交自动关闭问题的东西,但开箱即用你运气不好。