Skip to content

Commit 8477db5

Browse files
vgrlCopilotCopilotvgrltwinsheenyg
authored
[2026-07-09] Improved repo exploration with Copilot Chat (#61845)
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: vgrltwin <vgrl+twin@github.com> Co-authored-by: Sheena Ganju <sheenyg@github.com>
1 parent 9327df3 commit 8477db5

3 files changed

Lines changed: 48 additions & 6 deletions

File tree

content/copilot/how-tos/copilot-on-github/chat-with-copilot/get-started-with-chat.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ category:
2323

2424
## Repository questions
2525

26-
Navigate to a repository to ask about its code, structure, or history.
26+
Navigate to a repository to ask about its purpose, structure, code, or history. {% data variables.copilot.copilot_chat_short %} grounds its answers in the actual files and symbols in the repository, so you can get a high-level overview and then ask follow-up questions within the same context.
2727

2828
* {% prompt %}What is the main purpose of this repo?{% endprompt %}
29+
* {% prompt %}Give me an overview of how this project is structured.{% endprompt %}
30+
* {% prompt %}How do I set up and run this project locally?{% endprompt %}
2931
* {% prompt %}Where is rate limiting implemented in our API?{% endprompt %}
3032
* {% prompt %}What was the last merged PR by USERNAME{% endprompt %}
3133

@@ -47,6 +49,14 @@ Navigate to a pull request to ask about changes, reviews, or failing workflows.
4749
* {% prompt %}What did {% data variables.product.prodname_copilot_short %} change in this PR and why?{% endprompt %}
4850
* {% prompt %}What did {% data variables.product.prodname_copilot_short %} validate before opening this PR?{% endprompt %}
4951

52+
## Debugging questions
53+
54+
Navigate to a failed workflow run, a pull request with a failing check, or paste a stack trace to get help diagnosing and fixing the problem.
55+
56+
* {% prompt %}Why did this workflow run fail?{% endprompt %}
57+
* {% prompt %}Explain this stack trace and suggest a fix.{% endprompt %}
58+
* {% prompt %}Which change in this PR most likely caused the failing test?{% endprompt %}
59+
5060
## Security alert questions
5161

5262
Navigate to a {% data variables.product.prodname_code_scanning %}, {% data variables.product.prodname_secret_scanning %}, or {% data variables.product.prodname_dependabot %} alert to ask about it.

content/copilot/tutorials/explore-a-codebase.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ redirect_from:
99
- /copilot/tutorials/using-copilot-to-explore-a-codebase
1010
contentType: tutorials
1111
category:
12-
- Scale institutional knowledge
12+
- Scale institutional knowledge
1313
- Author and optimize with Copilot
1414
---
1515

@@ -21,15 +21,28 @@ If you've been assigned to work on a project that you're not familiar with—or
2121

2222
Throughout this guide, we'll work with {% data variables.copilot.copilot_chat_short %} on {% data variables.product.prodname_dotcom_the_website %}, which you can find at [github.com/copilot](https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=text).
2323

24-
## Attaching a codebase
24+
## Providing repository context
2525

26-
Before {% data variables.copilot.copilot_chat_short %} can help you, you need to attach the codebase you want to explore.
26+
You can ask {% data variables.copilot.copilot_chat_short %} about a codebase in either of these ways.
27+
28+
### Attaching a repository in chat
29+
30+
Attaching a repository gives {% data variables.copilot.copilot_chat_short %} access to the code in the repository, and is best when you want to compare or switch between repositories during a conversation.
2731

2832
1. On {% data variables.product.github %}, navigate to [github.com/copilot](https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=text).
2933
1. In the text box, click **{% octicon "plus" aria-label="Add attachments" %} Add repositories, files, and spaces**, then click **Repositories**.
3034
1. Search for and select the repository you want to explore.
3135

32-
{% data variables.copilot.copilot_chat_short %} now has access to the code in that repository, and you can start asking questions about it.
36+
### Asking from the repository page
37+
38+
> [!NOTE]
39+
> This feature is currently in {% data variables.release-phases.public_preview %} and subject to change.
40+
41+
You can ask {% data variables.copilot.copilot_chat_short %} about a repository directly from its page on {% data variables.product.github %}, without attaching it first. This is a quick way to get oriented in a project you haven't worked on before.
42+
43+
1. On {% data variables.product.github %}, navigate to the repository you want to explore.
44+
1. Open {% data variables.copilot.copilot_chat_short %} from the repository page and ask a question. {% data variables.product.prodname_copilot_short %} uses the repository as context and grounds its answers in the repository's actual files and symbols.
45+
1. Ask a follow-up question to go deeper, using the same shared context.
3346

3447
## Example prompts
3548

@@ -41,6 +54,10 @@ The following prompts are examples of the kind of questions you can ask {% data
4154

4255
* `Based on the code in this repository, give me an overview of the architecture of the codebase. Provide evidence.`
4356

57+
* `Give me an overview of this repository: its purpose, structure, key components, and how to run it.`
58+
59+
* `What are the main entry points and how do the key components fit together?`
60+
4461
* `Which languages are used in this repo? Show the percentages for each language.`
4562

4663
* `What are the core algorithms implemented in this repo?`
@@ -104,7 +121,7 @@ Use {% data variables.product.prodname_copilot_short %} to help you understand t
104121

105122
1. On {% data variables.product.github %}, navigate to a repository and open a file.
106123
1. At the top of the file, click the {% data variables.product.prodname_copilot_short %} icon (**{% octicon "copilot" aria-label="Copilot icon" %}**) to open {% data variables.copilot.copilot_chat_short %}.
107-
124+
108125
{% data variables.product.prodname_copilot_short %} will display the file contents in a split screen as context for your question.
109126

110127
1. If you want to ask about a specific symbol, highlight the symbol in the file.

content/copilot/tutorials/explore-pull-requests.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ The following prompts are examples of the kind of questions you can ask {% data
3434
* `What is the current status of this pull request?`
3535
* `What are the main changes in this pull request?`
3636

37+
## Ask {% data variables.product.prodname_copilot_short %} to explain changes in a pull request
38+
39+
You can ask {% data variables.product.prodname_copilot_short %} to examine the changes in a pull request and provide insights. {% data variables.product.prodname_copilot_short %} can return a story of the commits made, a list of unresolved feedback, or assistance with performing a structured review with insights and actionable suggestions, using context from the pull request's file changes, commits, comments, and existing reviews.
40+
41+
1. On {% data variables.product.github %}, navigate to a pull request in a repository.
42+
1. Open {% data variables.copilot.copilot_chat_short %}, type your question, and press <kbd>Enter</kbd>.
43+
44+
### Example prompts
45+
* `Help me understand the commits made in this pull request.`
46+
* `Is there any unresolved feedback in this pull request?`
47+
* `Help review this pull request.`
48+
3749
## Ask about changes to a specific file in a pull request
3850

3951
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.
@@ -43,6 +55,8 @@ You can ask {% data variables.product.prodname_copilot_short %} to explain the c
4355
1. To the right side of a line in the file you want to ask about, click the {% octicon "triangle-down" aria-hidden="true" aria-label="Show file actions" %} icon, then click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**, and select **Ask about this diff**.
4456

4557
This opens {% data variables.copilot.copilot_chat_short %} with the file changes indicated as the context of your question.
58+
59+
Your conversation appears alongside the diff, so you can review the code and chat at the same time.
4660
1. Type a question in the prompt box at the bottom of the chat panel and press <kbd>Enter</kbd>.
4761

4862
### Example prompts
@@ -96,3 +110,4 @@ When you view a pull request created by {% data variables.copilot.copilot_cloud_
96110
## Further reading
97111

98112
* [AUTOTITLE](/copilot/tutorials/using-copilot-to-explore-a-codebase)
113+
* [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/accelerate-pull-requests)

0 commit comments

Comments
 (0)