gpt4 book ai didi

github - 自动关闭 GitHub 中拉取请求的问题

转载 作者:行者123 更新时间:2023-12-03 01:56:55 25 4
gpt4 key购买 nike

如何使用 GitHub 上的拉取请求关闭问题?我知道closing multiple issues with a commit message ,但情况不同。

我想不是通过提交来关闭问题,而是通过拉取请求的描述来关闭问题。更像

拉取请求:

Name: bla bla
Description ... , _fixes_ #123

合并拉取请求时,#123自动关闭。这可能吗?

最佳答案

正如你mention in the comments来自拉取请求的合并将导致提交。
您可以在该提交消息上添加“close #xx”以触发问题的关闭。

但是,正如“Closing multiple issues in Github with a commit message”、GitHub 博客文章“Closing Issues via Commit Messages”(2013 年 1 月)和 current GitHub docs 中所述。 .

Now when you enter "Fixes #33" in a commit message, issue 33 will only be closed once the commit is merged into your default branch (usually master).

This is super useful because it means the issue's open / closed status will map to your default branch.
If the bug isn't fixed in your default branch, the issue will remain open.
Once the commit with the fix is merged into your default branch the issue will be automatically closed.

When you do make a commit in a non-default branch with the "Fixes #33" syntax, the issue will be referenced with a tooltip:

Closing Issue

You can use any of these keywords to close an issue via commit message:

close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
<小时/>

mentioned below通过 cosmolev (已投票),来自 May 14th 2013 "Closing Issues via Pull Requests" 的博文添加拉取请求作为解决问题的方式:

some issues take more work than a single commit to close.
That's why you can now close an issue from a Pull Request.
All you have to do is include the special keyword syntax (eg. "fixes #5") in the body of your Pull Request.

comment on pull request

the referenced issue will automatically be closed when the PR is merged into the default branch.
It even works across repositories.

John Eikenberry指出in the comments ,帮助页面“Closing issues using keywords”确实提到:

To close multiple issues, preface each issue reference with one of the above keywords.
You must use the keyword before each issue you reference for the keyword to work.

例如,This closes #34, closes #23, and closes example_user/example_repo#42 将关闭同一存储库中的问题 #34 和 #23,并关闭“example_user/example_repo”存储库。

关于github - 自动关闭 GitHub 中拉取请求的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12235620/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com