1
0
mirror of synced 2025-12-25 02:17:36 -05:00
Files
docs/content/copilot/tutorials/explore-pull-requests.md

4.6 KiB

title, shortTitle, intro, topics, versions, redirect_from, contentType
title shortTitle intro topics versions redirect_from contentType
Using Copilot to explore pull requests Explore pull requests {% data variables.copilot.copilot_chat %} can help you understand the content, functionality, and status of a pull request.
Copilot
feature
copilot
/copilot/tutorials/using-copilot-to-explore-pull-requests
tutorials

Introduction

You can ask {% data variables.product.prodname_copilot_short %} different questions about a pull request, from different views within the pull request. For example, you can ask {% data variables.product.prodname_copilot_short %} to summarize a pull request, or explain what has changed within specific files or lines of code in a pull request.

Get a summary of a pull request

You can ask {% data variables.product.prodname_copilot_short %} to summarize a pull request, or to provide information about the status of a pull request.

  1. On {% data variables.product.github %}, navigate to a pull request in a repository. {% data reusables.copilot.open-chat-panel %} {% data reusables.copilot.chat-previous-conversation %}
  2. At the bottom of the {% data variables.copilot.copilot_chat_short %} panel, in the prompt box, type a question and press Enter.

Example prompts

The following prompts are examples of the kind of questions you can ask {% data variables.product.prodname_copilot_short %} to help you find out about a pull request.

  • Summarize this pull request
  • What is the current status of this pull request?
  • What are the main changes in this pull request?

Ask about changes to a specific file in a pull request

You can ask {% data variables.product.prodname_copilot_short %} to explain the changes made to a specific file in a pull request, or to provide information about the status of a file in a pull request.

  1. On {% data variables.product.github %}, navigate to a pull request in a repository.
  2. Click the Files changed tab.
  3. Click {% octicon "kebab-horizontal" aria-label="Show options" %} at the top right of the file, then click Ask {% data variables.product.prodname_copilot_short %} about this diff.
  4. Type a question in the prompt box at the bottom of the chat panel and press Enter.

Example prompts

  • What are the changes in this file?
  • What is the status of this file in the pull request?

Ask about specific lines within a file in a pull request

You can ask {% data variables.product.prodname_copilot_short %} to explain specific lines of code in a pull request, or to provide information about the status of those lines.

  1. On {% data variables.product.github %}, navigate to a pull request in a repository.
  2. Click the Files changed tab.
  3. Click the line number for the first line you want to select, then hold down Shift and click the line number for the last line you want to select.
  4. Ask {% data variables.product.prodname_copilot_short %} a question, or choose from a list of predefined questions.
    • To ask your own question about the selected lines, to the right of your selection, click the {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %} icon. This displays the {% data variables.copilot.copilot_chat %} panel with the selected lines indicated as the context of your question.

Example prompts

  • Explain the selected lines of code
  • What do these lines of code do?

Ask why a workflow has failed

You can ask {% data variables.product.prodname_copilot_short %} to explain why a workflow has failed in a pull request, and provide suggestions for how to fix the issue.

  1. On {% data variables.product.github %}, navigate to a pull request in a repository.

  2. Scroll to the bottom of the page, then, next to one of the failing checks, click Details. {% data reusables.copilot.open-chat-panel %} {% data reusables.copilot.chat-previous-conversation %}

  3. At the bottom of the {% data variables.copilot.copilot_chat_short %} panel, in the prompt box, ask {% data variables.product.prodname_copilot_short %} why the pull request has failed and press Enter.

    {% data variables.product.prodname_copilot_short %} responds with information about why the pull request failed. {% data variables.product.prodname_copilot_short %} may also provide suggestions for how to fix the issue.

  4. If {% data variables.product.prodname_copilot_short %} has provided steps to fix the issue, you can follow the steps to resolve the problem.

Example prompts

  • Why has this workflow failed?
  • What can I do to fix this issue?

Further reading