Publicamos atualizações frequentes em nossa documentação, e a tradução desta página ainda pode estar em andamento. Para obter as informações mais recentes, acesse a documentação em inglês. Se houver problemas com a tradução desta página, entre em contato conosco.

Esta versão do GitHub Enterprise será descontinuada em Esta versão do GitHub Enterprise foi descontinuada em 2020-05-23. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Versão do artigo: Enterprise Server 2.17

Linking a pull request to an issue

You can link a pull request to an issue to automatically close the issue when the pull request is merged.

Neste artigo

About linked issues and pull requests

You can link an issue to a pull request using a supported keyword in the pull request description.

When you merge a linked pull request into the default branch of a repository, its linked issue is automatically closed. For more information about the default branch, see "Setting the default branch."

Linking a pull request to an issue using a keyword

You can link a pull request to an issue by using a supported keyword in the pull request's description.

  • close
  • closes
  • closed
  • fix
  • fixes
  • fixed
  • resolve
  • resolve
  • resolved

The syntax for closing keywords depends on whether the issue is in the same repository as the pull request.

Linked issueSintaxeExemplo
Issue in the same repositoryKEYWORD #ISSUE-NUMBERCloses #10
Issue in a different repositoryKEYWORD OWNER/REPOSITORY#ISSUE-NUMBERFixes octo-org/octo-repo#100
Multiple issuesUse full syntax for each issueResolves #10, resolves #123, resolves octo-org/octo-repo#100

You can also use closing keywords in a commit message. The issue will be closed when you merge the commit into the default branch.

Leia mais

Pergunte a uma pessoa

Não consegue encontrar o que procura?

Entrar em contato