Github 提交语法链接请求/问题

我看到过提交消息,它们指向特定的问题/请求。包含特定存储库的问题或请求的语法是什么?

37937 次浏览

Use the documented auto-linking format for issues across repositories.

  • Syntax: {owner}/{repository}#{issue_number}
  • Example: mojombo/jekyll#1

When such formatted text is present in a commit message, it's automatically transformed into a clickable link which will redirect one to https://github.com/{owner}/{repository}/issues/{issue_number}

Use #1234 in a comment to reference pull request 1234 from the current repo.

Github share PR/Issue number use the same sequence.

So, one #number either one PR or one Issue.

Just use #number is OK.

For linking to another repository, if you just paste the link to the issue or pull request, say https://github.com/{owner}/{repository}/issues/{issue_number}, GitHub will render it as

[{owner}/{repository}#{issue_number}](https://github.com/{owner}/{repository}/issues/{issue_number})

For example, https://github.com/jlord/sheetsee.js/issues/26 will render as jlord/sheetsee.js#26.

See https://help.github.com/articles/autolinked-references-and-urls/#issues-and-pull-requests