Skip to content

Commit 55278a7

Browse files
authored
Merge pull request #38904 from github/repo-sync
Repo sync
2 parents a3694f3 + 71b1544 commit 55278a7

File tree

10 files changed

+189
-55
lines changed

10 files changed

+189
-55
lines changed

content/copilot/using-github-copilot/code-review/using-copilot-code-review.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ To request a re-review from {% data variables.product.prodname_copilot_short %},
152152

153153
By default, you manually request a review from {% data variables.product.prodname_copilot_short %} on each pull request, in the same way you would request a review from a human. However, you can set up {% data variables.product.prodname_copilot_short %} to automatically review all pull requests. See [AUTOTITLE](/copilot/using-github-copilot/code-review/configuring-automatic-code-review-by-copilot).
154154

155+
## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with custom instructions
156+
157+
{% data reusables.copilot.code-review.custom-instructions-information %}
158+
155159
## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines
156160

157161
{% data reusables.copilot.code-review.custom-coding-guidelines %}
@@ -223,6 +227,10 @@ To provide feedback, hover over the comment and click the thumbs up or thumbs do
223227

224228
![Screenshot of a comment from {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_vscode %} with feedback buttons displayed. The buttons are outlined in dark orange.](/assets/images/help/copilot/code-review/vscode-comment-feedback@2x.png)
225229

230+
## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with custom instructions
231+
232+
{% data reusables.copilot.code-review.custom-instructions-information %}
233+
226234
## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines
227235

228236
{% data reusables.copilot.code-review.custom-coding-guidelines %}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: Developing your project locally
3+
intro: 'Learn how to create a local development environment by working with an example client-side application built on HTML, CSS, and JavaScript.'
4+
versions:
5+
fpt: '*'
6+
shortTitle: Local development
7+
---
8+
9+
## Overview
10+
11+
Local development means setting up and **running your project on your own computer** instead of in the cloud or on a remote server. When you develop locally, you can work on your code without an internet connection and experiment without affecting the live application.
12+
13+
The steps required to configure a local development environment are different for each project, based on its programming languages, frameworks, tools, and dependencies. In this guide, you'll learn **core skills** needed to set up any project by working with an example client-side application built on HTML, CSS, and JavaScript. You can then apply those same skills to other projects in the future.
14+
15+
## Installing essential development tools
16+
17+
Before you can start, you'll need to install some essential tools that are widely used for local development.
18+
19+
1. [Set up {% data variables.product.prodname_vscode_shortname %} with {% data variables.product.prodname_copilot %}](https://code.visualstudio.com/docs/copilot/setup-simplified).
20+
1. [Install Git](https://git-scm.com/downloads).
21+
22+
## Cloning and opening the repository in {% data variables.product.prodname_vscode_shortname %}
23+
24+
First, make a copy of the repository on your computer by cloning it.
25+
26+
1. [Start by cloning the new2code/client-side-web-application repository](vscode://vscode.git/clone?url=https://github.com/new2code/client-side-web-application). This link opens a dialog in {% data variables.product.prodname_vscode_shortname %} to clone the repository. <!-- markdownlint-disable-line GHD003 -->
27+
1. Choose a location to save the repository on your computer, then click **Select as Repository Destination**.
28+
1. When prompted, open the repository.
29+
30+
## Installing project requirements
31+
32+
1. [Open {% data variables.copilot.copilot_chat_short %}](vscode://GitHub.Copilot-Chat), then ask it to identify what you need to install with the following prompt. <!-- markdownlint-disable-line GHD003 -->
33+
34+
```text copy
35+
What do I need to install to develop this project locally?
36+
```
37+
38+
For this example, {% data variables.product.prodname_copilot_short %} will say that this project needs Node.js. Node.js allows you to run JavaScript code on your computer and provides tools for web development.
39+
40+
1. Ask {% data variables.product.prodname_copilot_short %} how to install the project requirements, then follow the steps to install them on your computer.
41+
42+
For this example, we could ask "How do I install Node.js?" {% data variables.product.prodname_copilot_short %} will provide instructions for visiting https://nodejs.org/ and downloading the installer.
43+
44+
## Installing project dependencies
45+
46+
Now that you have the required software installed, you need to understand how to use it for this specific project.
47+
48+
**Check the README file first**. Most projects include a README file in the root directory that explains how to set up and run the project. For this project, both the README file and asking {% data variables.product.prodname_copilot_short %} will tell you that the next step is to install the project's dependencies using npm, the Node.js package manager.
49+
50+
1. Open the Command Palette by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux) or <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Mac).
51+
52+
1. Type `Terminal: Create New Terminal` and press <kbd>Enter</kbd>.
53+
54+
1. In the terminal tab, paste the following command.
55+
56+
```bash copy
57+
npm install
58+
```
59+
60+
Because this project uses Node.js, we used `npm install` to read the `package.json` file and download all the dependencies the project needs to work properly. Other types of projects will use different commands. For example, Python projects might use `pip install -r requirements.txt`, and Ruby projects might use `bundle install`.
61+
62+
If the README doesn't include information about installing dependencies, you can:
63+
64+
* **Look for configuration files**: Different projects use different files to list their dependencies—for example, Node.js projects use `package.json`, Python projects use `requirements.txt`, and Ruby projects use `Gemfile`.
65+
* **Ask {% data variables.product.prodname_copilot_short %}**: Try a prompt like, "Now that I have Node.js installed, what's the next step to set up this project?"
66+
67+
## Running and developing your project
68+
69+
Now that your development environment is set up, you can start the development server and use it to preview changes to your code.
70+
71+
1. Find out how to start the project by checking the README file in your project folder.
72+
73+
For this example, the "Steps for running locally" section of the README explains that you can start the development server with the `npm start` command. Enter the following command in your terminal.
74+
75+
```bash copy
76+
npm start
77+
```
78+
79+
1. To identify where the local server is available, review the terminal output. You'll see that the local server is available on http://localhost:8080. Navigate to that address in your browser.
80+
1. Make a small change to the code, such as editing some text in the HTML file or changing a color in the CSS file. Save your changes.
81+
1. Check the project documentation or terminal output to understand how to see your changes. Some projects automatically refresh after you save the changes, while others require refreshing your browser window.
82+
83+
For this project, refresh your browser window to see your changes.
84+
85+
If the README doesn't contain the information you need, check the configuration files for available commands. You can also ask [{% data variables.copilot.copilot_chat_short %}](vscode://GitHub.Copilot-Chat) with the following prompt. <!-- markdownlint-disable-line GHD003 -->
86+
87+
```text copy
88+
How do I start this project locally?
89+
```
90+
91+
## What's next?
92+
93+
Now that you've successfully set up your first local development environment, it's time to apply these skills to different types of projects.
94+
95+
**Practice with a different project**: Try setting up another project with different requirements. For example, [@new2code's Python web application](https://github.com/new2code/python-web-application) uses Python and Flask instead of Node.js. <!-- markdownlint-disable-line GHD003 -->
96+
97+
Use what you learned in this tutorial to:
98+
99+
* Clone the repository using {% data variables.product.prodname_vscode_shortname %}
100+
* Ask {% data variables.product.prodname_copilot_short %} what tools and dependencies you need to install
101+
* Read the README file to understand how to run the project
102+
* Get the application running in your browser
103+
104+
This practice will help you recognize patterns across different technologies and build confidence in your ability to set up any project locally.

content/get-started/learning-to-code/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ children:
88
- /finding-and-understanding-example-code
99
- /reusing-other-peoples-code-in-your-projects
1010
- /setting-up-copilot-for-learning-to-code
11+
- /developing-your-project-locally
1112
- /learning-to-debug-with-github-copilot
1213
- /storing-your-secrets-safely
1314
- /finding-and-fixing-your-first-code-vulnerability
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
> [!NOTE]
2+
> Custom instructions for {% data variables.copilot.copilot_code-review_short %} are in {% data variables.release-phases.public_preview %} and are subject to change.
3+
>
4+
> This feature is available with the {% data variables.copilot.copilot_pro_short %}, {% data variables.copilot.copilot_pro_plus_short %} {% data variables.copilot.copilot_business_short %}, and {% data variables.copilot.copilot_enterprise_short %} plan.
5+
>
6+
> During the {% data variables.release-phases.public_preview %}, if you're using a {% data variables.copilot.copilot_business_short %} or {% data variables.copilot.copilot_enterprise_short %} plan, the organization or enterprise that provides your plan must have the **Opt in to preview features** setting enabled. See [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization) or [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#copilot-in-githubcom)
7+
8+
Customize {% data variables.copilot.copilot_code-review_short %} behavior by adding a repository custom instructions file. To do this, create a `.github/copilot-instructions.md` file in your repository and add natural language text that you want {% data variables.product.prodname_copilot_short %} to consider when reviewing code. This is the same `copilot-instructions.md` used by {% data variables.copilot.copilot_chat_short %}. See [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot).
9+
10+
To enable or disable custom instructions for code review, go to your repository’s settings, then navigate to **Code Review** under **Copilot**, and toggle the “Use custom instructions when reviewing pull requests” option.
11+
12+
### Example
13+
14+
This example of a `.github/copilot-instructions.md` file contains three instructions that will be applied to all {% data variables.copilot.copilot_code-review_short %}s in the repository.
15+
16+
```text
17+
When performing a code review, respond in Spanish.
18+
19+
When performing a code review, follow our internal security checklist.
20+
21+
When performing a code review, focus on readability and avoid nested ternary operators.
22+
```
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
* **Opt in to user feedback collection:** If enabled, users can provide feedback on {% data variables.product.prodname_copilot_short %} pull request summaries. For more information, see [AUTOTITLE](/enterprise-cloud@latest/copilot/github-copilot-enterprise/copilot-pull-request-summaries/creating-a-pull-request-summary-with-github-copilot).
2-
* **Opt in to preview features:** If enabled, users can test new {% data variables.product.prodname_copilot_short %} features that are not yet generally available. Be aware that previews of features may have flaws, and the features may be changed or discontinued at any time. Current previews of {% data variables.product.prodname_copilot_short %} features include {% data variables.copilot.copilot_spaces %}. See [AUTOTITLE](/copilot/using-github-copilot/copilot-spaces/about-organizing-and-sharing-context-with-copilot-spaces).
2+
* **Opt in to preview features:** If enabled, users can test new {% data variables.product.prodname_copilot_short %} features that are not yet generally available. Be aware that previews of features may have flaws, and the features may be changed or discontinued at any time. Current previews of {% data variables.product.prodname_copilot_short %} features include:
3+
4+
* {% data variables.copilot.copilot_spaces %}. See [AUTOTITLE](/copilot/using-github-copilot/copilot-spaces/about-organizing-and-sharing-context-with-copilot-spaces).
5+
* Repository custom instructions for {% data variables.copilot.copilot_code-review_short %}. See [Customizing {% data variables.product.prodname_copilot_short %}'s reviews with custom instructions](/copilot/using-github-copilot/code-review/using-copilot-code-review#customizing-copilots-reviews-with-custom-instructions).

src/graphql/data/fpt/changelog.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
[
2+
{
3+
"schemaChanges": [
4+
{
5+
"title": "The GraphQL schema includes these changes:",
6+
"changes": [
7+
"<p>Type <code>BotOrUser</code> was removed</p>",
8+
"<p>Input field <code>botIds</code> of type '[ID!]<code>was added to input object type</code>RequestReviewsInput'</p>"
9+
]
10+
}
11+
],
12+
"previewChanges": [],
13+
"upcomingChanges": [],
14+
"date": "2025-06-13"
15+
},
216
{
317
"schemaChanges": [
418
{

src/graphql/data/fpt/schema.docs.graphql

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,11 +2413,6 @@ type Bot implements Actor & Node & UniformResourceLocatable {
24132413
url: URI!
24142414
}
24152415

2416-
"""
2417-
Used when either Bot or User are accepted.
2418-
"""
2419-
union BotOrUser = Bot | User
2420-
24212416
"""
24222417
Types which can be actors for `BranchActorAllowance` objects.
24232418
"""
@@ -6469,7 +6464,8 @@ input ContributionOrder {
64696464
}
64706465

64716466
"""
6472-
A contributions collection aggregates contributions such as opened issues and commits created by a user.
6467+
A collection of contributions made by a user, including opened issues, commits, and pull requests.
6468+
Contributions in private and internal repositories are only included with the optional read:user scope.
64736469
"""
64746470
type ContributionsCollection {
64756471
"""
@@ -53600,6 +53596,11 @@ type ReprioritizeSubIssuePayload {
5360053596
Autogenerated input type of RequestReviews
5360153597
"""
5360253598
input RequestReviewsInput {
53599+
"""
53600+
The Node IDs of the bot to request.
53601+
"""
53602+
botIds: [ID!] @possibleTypes(concreteTypes: ["Bot"])
53603+
5360353604
"""
5360453605
A unique identifier for the client performing the mutation.
5360553606
"""
@@ -53623,7 +53624,7 @@ input RequestReviewsInput {
5362353624
"""
5362453625
The Node IDs of the user to request.
5362553626
"""
53626-
userIds: [ID!] @possibleTypes(concreteTypes: ["Bot", "User"])
53627+
userIds: [ID!] @possibleTypes(concreteTypes: ["User"])
5362753628
}
5362853629

5362953630
"""

src/graphql/data/fpt/schema.json

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16179,7 +16179,7 @@
1617916179
"kind": "objects",
1618016180
"id": "contributionscollection",
1618116181
"href": "/graphql/reference/objects#contributionscollection",
16182-
"description": "<p>A contributions collection aggregates contributions such as opened issues and commits created by a user.</p>",
16182+
"description": "<p>A collection of contributions made by a user, including opened issues, commits, and pull requests.\nContributions in private and internal repositories are only included with the optional read:user scope.</p>",
1618316183
"fields": [
1618416184
{
1618516185
"name": "commitContributionsByRepository",
@@ -94746,25 +94746,6 @@
9474694746
}
9474794747
]
9474894748
},
94749-
{
94750-
"name": "BotOrUser",
94751-
"kind": "unions",
94752-
"id": "botoruser",
94753-
"href": "/graphql/reference/unions#botoruser",
94754-
"description": "<p>Used when either Bot or User are accepted.</p>",
94755-
"possibleTypes": [
94756-
{
94757-
"name": "Bot",
94758-
"id": "bot",
94759-
"href": "/graphql/reference/objects#bot"
94760-
},
94761-
{
94762-
"name": "User",
94763-
"id": "user",
94764-
"href": "/graphql/reference/objects#user"
94765-
}
94766-
]
94767-
},
9476894749
{
9476994750
"name": "BranchActorAllowanceActor",
9477094751
"kind": "unions",
@@ -106047,6 +106028,15 @@
106047106028
"href": "/graphql/reference/input-objects#requestreviewsinput",
106048106029
"description": "<p>Autogenerated input type of RequestReviews.</p>",
106049106030
"inputFields": [
106031+
{
106032+
"name": "botIds",
106033+
"description": "<p>The Node IDs of the bot to request.</p>",
106034+
"type": "[ID!]",
106035+
"id": "id",
106036+
"kind": "scalars",
106037+
"href": "/graphql/reference/scalars#id",
106038+
"isDeprecated": false
106039+
},
106050106040
{
106051106041
"name": "clientMutationId",
106052106042
"description": "<p>A unique identifier for the client performing the mutation.</p>",

src/graphql/data/ghec/schema.docs.graphql

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,11 +2413,6 @@ type Bot implements Actor & Node & UniformResourceLocatable {
24132413
url: URI!
24142414
}
24152415

2416-
"""
2417-
Used when either Bot or User are accepted.
2418-
"""
2419-
union BotOrUser = Bot | User
2420-
24212416
"""
24222417
Types which can be actors for `BranchActorAllowance` objects.
24232418
"""
@@ -6469,7 +6464,8 @@ input ContributionOrder {
64696464
}
64706465

64716466
"""
6472-
A contributions collection aggregates contributions such as opened issues and commits created by a user.
6467+
A collection of contributions made by a user, including opened issues, commits, and pull requests.
6468+
Contributions in private and internal repositories are only included with the optional read:user scope.
64736469
"""
64746470
type ContributionsCollection {
64756471
"""
@@ -53600,6 +53596,11 @@ type ReprioritizeSubIssuePayload {
5360053596
Autogenerated input type of RequestReviews
5360153597
"""
5360253598
input RequestReviewsInput {
53599+
"""
53600+
The Node IDs of the bot to request.
53601+
"""
53602+
botIds: [ID!] @possibleTypes(concreteTypes: ["Bot"])
53603+
5360353604
"""
5360453605
A unique identifier for the client performing the mutation.
5360553606
"""
@@ -53623,7 +53624,7 @@ input RequestReviewsInput {
5362353624
"""
5362453625
The Node IDs of the user to request.
5362553626
"""
53626-
userIds: [ID!] @possibleTypes(concreteTypes: ["Bot", "User"])
53627+
userIds: [ID!] @possibleTypes(concreteTypes: ["User"])
5362753628
}
5362853629

5362953630
"""

src/graphql/data/ghec/schema.json

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16179,7 +16179,7 @@
1617916179
"kind": "objects",
1618016180
"id": "contributionscollection",
1618116181
"href": "/graphql/reference/objects#contributionscollection",
16182-
"description": "<p>A contributions collection aggregates contributions such as opened issues and commits created by a user.</p>",
16182+
"description": "<p>A collection of contributions made by a user, including opened issues, commits, and pull requests.\nContributions in private and internal repositories are only included with the optional read:user scope.</p>",
1618316183
"fields": [
1618416184
{
1618516185
"name": "commitContributionsByRepository",
@@ -94746,25 +94746,6 @@
9474694746
}
9474794747
]
9474894748
},
94749-
{
94750-
"name": "BotOrUser",
94751-
"kind": "unions",
94752-
"id": "botoruser",
94753-
"href": "/graphql/reference/unions#botoruser",
94754-
"description": "<p>Used when either Bot or User are accepted.</p>",
94755-
"possibleTypes": [
94756-
{
94757-
"name": "Bot",
94758-
"id": "bot",
94759-
"href": "/graphql/reference/objects#bot"
94760-
},
94761-
{
94762-
"name": "User",
94763-
"id": "user",
94764-
"href": "/graphql/reference/objects#user"
94765-
}
94766-
]
94767-
},
9476894749
{
9476994750
"name": "BranchActorAllowanceActor",
9477094751
"kind": "unions",
@@ -106047,6 +106028,15 @@
106047106028
"href": "/graphql/reference/input-objects#requestreviewsinput",
106048106029
"description": "<p>Autogenerated input type of RequestReviews.</p>",
106049106030
"inputFields": [
106031+
{
106032+
"name": "botIds",
106033+
"description": "<p>The Node IDs of the bot to request.</p>",
106034+
"type": "[ID!]",
106035+
"id": "id",
106036+
"kind": "scalars",
106037+
"href": "/graphql/reference/scalars#id",
106038+
"isDeprecated": false
106039+
},
106050106040
{
106051106041
"name": "clientMutationId",
106052106042
"description": "<p>A unique identifier for the client performing the mutation.</p>",

0 commit comments

Comments
 (0)