Skip to content

Commit 8bda3d8

Browse files
authored
Merge pull request #38865 from github/repo-sync
Repo sync
2 parents 510510d + eb0f998 commit 8bda3d8

File tree

10 files changed

+162
-80
lines changed

10 files changed

+162
-80
lines changed
82.2 KB
Loading

content/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ You can add custom instructions for {% data variables.copilot.copilot_chat %} in
2626
You can add personal custom instructions either in the Chat panel or in immersive mode. The same instructions will be applied in both modes.
2727

2828
1. In the top right of any page on {% data variables.product.github %}, either:
29-
* Click the **{% octicon "copilot" aria-label="Copilot" %}** icon to open the {% data variables.copilot.copilot_chat_short %} panel.
30-
* Click {% octicon "triangle-down" aria-label="The downwards triangle icon" %} next to the **{% octicon "copilot" aria-label="Copilot" %}** icon, then click **Immersive** to open {% data variables.copilot.copilot_chat_short %} in the full-page, immersive mode. You can also go directly to [https://github.com/copilot](https://github.com/copilot).
29+
30+
* Click the **{% octicon "copilot" aria-label="Copilot" %}** icon to open the full-page, immersive mode of {% data variables.copilot.copilot_chat_short %}.
31+
* Click {% octicon "triangle-down" aria-label="The downwards triangle icon" %} next to the **{% octicon "copilot" aria-label="Copilot" %}** icon, then click **Assistive** to open the {% data variables.copilot.copilot_chat_short %} panel.
32+
3133
1. Select the {% octicon "kebab-horizontal" aria-label="Open conversation options" %} dropdown menu at the top right of the Chat panel, or immersive page, then click **Personal instructions**.
3234
1. Add natural language instructions to the text box.
3335

content/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github.md

Lines changed: 32 additions & 65 deletions
Large diffs are not rendered by default.

content/copilot/using-github-copilot/guides-on-using-github-copilot/choosing-the-right-ai-tool-for-your-task.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ The use of AI tools is increasingly becoming a standard part of a software devel
1515
{% data variables.product.github %}'s AI tools assist with every phase of the software development lifecycle (SDLC):
1616

1717
* **Planning**:
18-
* {% data variables.product.prodname_copilot_short %} can create issues to help track your ideas.
19-
* {% data variables.copilot.copilot_chat_short %} can help you brainstorm and identify the best technologies for your project.
18+
* **{% data variables.copilot.copilot_chat_short %}** can help you brainstorm and identify the best technologies for your project.
19+
* **{% data variables.copilot.copilot_chat_short %}** can create issues to help track your ideas.
2020
* **Code creation**:
21-
* {% data variables.product.prodname_copilot_short %} code completion helps add code as you type.
22-
* {% data variables.copilot.next_edit_suggestions_caps %} ({% data variables.release-phases.public_preview %}) predicts the next edit you are likely to make and suggests a completion for it.
23-
* {% data variables.copilot.copilot_chat_short %} can answer questions and offer suggestions in a conversational environment.
24-
* You can assign {% data variables.copilot.copilot_coding_agent %} to an open issue and it will automatically raise a pull request to address the necessary changes.
21+
* **{% data variables.product.prodname_copilot_short %} code completion** helps add code as you type.
22+
* **{% data variables.copilot.next_edit_suggestions_caps %}** ({% data variables.release-phases.public_preview %}) predicts the next edit you are likely to make and suggests a completion for it.
23+
* **{% data variables.copilot.copilot_chat_short %}** can answer questions and offer suggestions in a conversational environment.
24+
* You can assign **{% data variables.copilot.copilot_coding_agent %}** to an open issue and it will automatically raise a pull request to address the necessary changes.
2525
* **Reviews**:
26-
* {% data variables.copilot.copilot_code-review_short %} gives you feedback in your favorite IDE, or as a pull request review on {% data variables.product.github %}.
26+
* **{% data variables.copilot.copilot_code-review_short %}** gives you feedback in your favorite IDE, or as a pull request review on {% data variables.product.github %}.
2727
* **Testing**:
28-
* {% data variables.copilot.copilot_chat_short %} can help you write and debug tests.
28+
* **{% data variables.copilot.copilot_chat_short %}** can help you write and debug tests.
2929
* **Deployment**:
30-
* {% data variables.copilot.copilot_chat_short %} can help you configure continuous integration and continuous deployment (CI/CD) pipelines.
30+
* **{% data variables.copilot.copilot_chat_short %}** can help you configure continuous integration and continuous deployment (CI/CD) pipelines.
3131
* **Operation**:
32-
* {% data variables.copilot.copilot_coding_agent %} ({% data variables.release-phases.public_preview %}) can raise pull requests for open issues.
33-
* {% data variables.copilot.copilot_chat_short %} can help with tasks you're working on yourself.
32+
* **{% data variables.copilot.copilot_coding_agent %}** ({% data variables.release-phases.public_preview %}) can raise pull requests for open issues.
33+
* **{% data variables.copilot.copilot_chat_short %}** can help with tasks you're working on yourself.
3434

3535
## Planning
3636

content/copilot/using-github-copilot/guides-on-using-github-copilot/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ topics:
99
redirect_from:
1010
- /copilot/using-github-copilot/example-use-cases
1111
children:
12+
- /choosing-the-right-ai-tool-for-your-task
13+
- /using-copilot-to-explore-a-codebase
1214
- /refactoring-code-with-github-copilot
1315
- /using-copilot-to-migrate-a-project
1416
- /writing-tests-with-github-copilot
1517
- /modernizing-legacy-code-with-github-copilot
1618
- /upgrading-java-projects-with-github-copilot
17-
- /choosing-the-right-ai-tool-for-your-task
1819
---
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: Using Copilot to explore a codebase
3+
shortTitle: Explore a codebase
4+
intro: '{% data variables.copilot.copilot_chat %} can help you gain an understanding of the content, structure, and functionality of a codebase.'
5+
topics:
6+
- Copilot
7+
versions:
8+
feature: copilot
9+
---
10+
11+
## Introduction
12+
13+
If you've been assigned to work on a project that you're not familiar with—or you've found an interesting open source project that you want to contribute to—you'll need some understanding of the codebase before you can start making changes. This guide will show you how to use {% data variables.copilot.copilot_chat %} to explore a codebase and quickly learn about the project.
14+
15+
## Working with {% data variables.copilot.copilot_chat_short %}
16+
17+
Throughout this guide, we'll work on {% data variables.product.prodname_dotcom_the_website %}, using {% data variables.copilot.copilot_chat_short %} in assistive mode, which displays a {% data variables.copilot.copilot_chat_short %} panel over the bottom right corner of your current page on {% data variables.product.prodname_dotcom_the_website %}.
18+
19+
You can expand the {% data variables.copilot.copilot_chat_short %} panel, to give more space for displaying {% data variables.product.prodname_copilot_short %}'s responses, by clicking and dragging the edges of the panel.
20+
21+
## Using the predefined prompts
22+
23+
{% data variables.copilot.copilot_chat_short %} comes with a set of predefined prompts that can help you get started with exploring a codebase. You can use the prompts by clicking a button in the chat panel. The buttons are displayed when you start a new conversation with {% data variables.copilot.copilot_chat_short %}. The selection of prompts varies depending on the currently displayed page on {% data variables.product.prodname_dotcom_the_website %}.
24+
25+
1. Open the repository you want to explore on {% data variables.product.prodname_dotcom_the_website %}.
26+
1. Click the **Code** tab to display the main page of the repository.
27+
1. {% data reusables.copilot.assistive-mode-instructions %}
28+
1. Click the **Tell me about this repository** button in the chat panel.
29+
30+
![Screenshot of the chat panel with the 'Tell me about this repository' button highlighted.](/assets/images/help/copilot/tell-me-about-repo.png)
31+
32+
> [!TIP]
33+
> If this button is not displayed, make sure you are on the main page of the repository and click the plus sign ({% octicon "plus" aria-hidden="true" aria-label="plus" %}) at the top right of the {% data variables.product.prodname_copilot_short %} panel to start a new conversation.
34+
35+
A predefined prompt is submitted to {% data variables.product.prodname_copilot_short %} and the response is displayed in the chat panel.
36+
37+
1. Optionally, after reading the response, click the plus sign ({% octicon "plus" aria-hidden="true" aria-label="plus" %}) at the top right of the {% data variables.product.prodname_copilot_short %} panel to start a new conversation, then click **How to get started with this repository**.
38+
39+
## Example prompts
40+
41+
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 codebase.
42+
43+
### General questions
44+
45+
<!-- Blank lines left between list items to space out the output slightly. -->
46+
47+
* `Based on the code in this repository, give me an overview of the architecture of the codebase. Provide evidence.`
48+
49+
* `Which languages are used in this repo? Show the percentages for each language.`
50+
51+
* `What are the core algorithms implemented in this repo?`
52+
53+
* `What design patterns are used in this repository? Give a brief explanation of each pattern that you find, and an example of code from this repository that uses the pattern, with a link to the file.`
54+
55+
### Specific questions
56+
57+
Whether these questions are useful will depend on the codebase you're exploring.
58+
59+
* `How do I build this project?`
60+
61+
* `Where is authentication handled in this codebase?`
62+
63+
* `Analyze the code in this repository and tell me about the entry points for this application.`
64+
65+
* `Describe the data flow in this application.`
66+
67+
* `Analyze the code in this repository and tell me what application-level security mechanisms are employed. Provide references.`
68+
69+
## Understanding the files in a directory
70+
71+
Use {% data variables.product.prodname_copilot_short %} to help you understand the purpose of the files in a directory, or individual files.
72+
73+
To find out about the files in a directory:
74+
75+
1. Navigate to the directory on {% data variables.product.prodname_dotcom_the_website %}.
76+
1. {% data reusables.copilot.assistive-mode-instructions %}
77+
1. Ask {% data variables.product.prodname_copilot_short %}: `Explain the files in this directory`.
78+
79+
To find out about a specific file:
80+
81+
1. Open the file on {% data variables.product.prodname_dotcom_the_website %}.
82+
1. {% data reusables.copilot.assistive-mode-instructions %}
83+
1. For a small file, ask {% data variables.product.prodname_copilot_short %}: `Explain this file`.
84+
1. For a large file, ask: `Explain what this file does. Start with an overview of the purpose of the file. Then, in appropriately headed sections, go through each part of the file and explain what it does in detail.`
85+
86+
## Finding out about commits
87+
88+
One good way to familiarize yourself with a project is to look at the recent work that's been happening. You can do this by browsing the recent commits.
89+
90+
{% data reusables.repositories.navigate-to-repo %}
91+
{% data reusables.repositories.navigate-to-commit-page %}
92+
1. Click a commit message to display a diff view for that commit.
93+
1. In the {% data variables.copilot.copilot_chat_short %} panel, enter: `What does this commit do?`.
94+
1. If necessary, you can follow up by entering: `Explain in more detail`.
95+
96+
## Using the Insights tab
97+
98+
In addition to using {% data variables.product.prodname_copilot_short %} to help you become familiar with a project, you can also use the **Insights** tab on {% data variables.product.prodname_dotcom_the_website %}. This gives you a high-level overview of the repository.
99+
100+
For more information, see [AUTOTITLE](/repositories/viewing-activity-and-data-for-your-repository/using-pulse-to-view-a-summary-of-repository-activity) and [AUTOTITLE](/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors).
101+
102+
## Further reading
103+
104+
* [AUTOTITLE](/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github)

content/get-started/exploring-projects-on-github/using-github-copilot-to-explore-projects.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ When you’re exploring a project, you might want to understand the contents of
3838

3939
{% data reusables.copilot.chat-about-specific-lines %}
4040

41+
## Further reading
42+
43+
* [AUTOTITLE](/copilot/using-github-copilot/guides-on-using-github-copilot/using-copilot-to-explore-a-codebase)
44+
4145
## Next steps
4246

4347
Now that you know how to use {% data variables.product.prodname_copilot_short %} to explore projects, you can use it to help you understand any repository, file, or line of code on {% data variables.product.prodname_dotcom %}.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Press <kbd>Shift</kbd>+<kbd>C</kbd> to open {% data variables.copilot.copilot_chat_short %} in assistive mode.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1. At the top right of any page on {% data variables.product.github %}, click the **{% octicon "copilot" aria-label="Copilot icon" %}** button next to the search bar.
2+
3+
The full-page, immersive, mode of {% data variables.copilot.copilot_chat_short %} is displayed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1. At the top right of the page, click the **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %}** {% data variables.product.prodname_copilot %} icon next to the search bar.
1+
1. At the top right of the page, click {% octicon "triangle-down" aria-label="The downwards triangle icon" %} next to the **{% octicon "copilot" aria-label="Copilot" %}** icon, then click **Assistive** to open the {% data variables.copilot.copilot_chat_short %} panel.

0 commit comments

Comments
 (0)