Using Codespaces for pull requests

You can use Codespaces in your development workflow to create pull requests, review pull requests, and address review comments.

代码空间可用于使用 GitHub Team 或 GitHub Enterprise Cloud 的组织。 更多信息请参阅“GitHub 的产品”。

关于 Codespaces 中的拉取请求

Codespaces provides you with many of the capabilities you might need to work with pull requests:

  • Create a pull request - Using either the Terminal and Git commands or the Source Control view, you can create pull requests just as you would on GitHub.com. If the repository uses a pull request template, you'll be able to use this within the Source Control view.
  • Open a pull request – You can open an existing pull request in a codespace, provided you have codespace access to the branch that is being merged in.
  • Review a pull request - Once you have opened a pull request in a codespace, you can use the "GitHub Pull Request" view to add review comments and approve pull requests. You can also use Codespaces to view review comments.

Opening a pull request in Codespaces

  1. 在仓库名称下,单击 拉取请求议题和拉取请求选项卡选择
  1. In the list of pull requests, click the pull request you'd like to open in Codespaces.
  2. On the right-hand side of your screen, click Code.
  3. From the Codespaces tab, click New codespace. Option to open PR in a codespace

Reviewing a pull request in Codespaces

  1. Open the pull request in a codespace, as described in "Opening a pull request."
  2. In the Activity Bar, click the GitHub Pull Request view. This view only appears when you open a pull request in a codespace. Option to open PR in a codespace
  3. To review a specific file, click the Open File icon in the Side Bar. Option to open PR in a codespace
  4. To add review comments, click the + icon next to the line number. Type your review comment and then click Start Review. Option to open PR in a codespace
  5. When you are finished adding review comments, from the Side Bar you can choose to either submit the comments, approve the changes, or request changes. Option to open PR in a codespace

For more information on reviewing a pull request, see "Reviewing proposed changes in a pull request."

View comments from a review in Codespaces

Once you have received feedback on a pull request, you can open it in a codespace to see the review comments. From there you can respond to comments, add reactions, or dismiss the review.

Option to open PR in a codespace

此文档对您有帮助吗?

隐私政策

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或者, 了解如何参与。