Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions content/copilot/concepts/agents/code-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ In the event that {% data variables.product.prodname_actions %} is unavailable o
* Xcode
* JetBrains IDEs

{% data variables.copilot.copilot_code-review_short %} is—with one exception—a premium feature, 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 %} plans. See [Copilot plans](https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=text&utm_source=docs-signup-copilot&utm_medium=docs&utm_campaign=universe25post).

The exception is the review of a selection of code within a file in {% data variables.product.prodname_vscode %}. This is a standard feature available to all {% data variables.product.prodname_copilot_short %} users in {% data variables.product.prodname_vscode_shortname %}.
{% data variables.copilot.copilot_code-review_short %} is a premium feature, 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 %} plans. See [Copilot plans](https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=text&utm_source=docs-signup-copilot&utm_medium=docs&utm_campaign=universe25post).

If you receive {% data variables.product.prodname_copilot_short %} from an organization then, to be able to request a pull request review from {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %} or in {% data variables.product.prodname_mobile %}, the **{% data variables.copilot.copilot_code-review_short %}** option must be enabled in the {% data variables.product.prodname_copilot_short %} policy settings for the organization. See [AUTOTITLE](/copilot/how-tos/administer/organizations/managing-policies-for-copilot-in-your-organization).

## Code review monthly quota

Each time {% data variables.product.prodname_copilot_short %} reviews a pull request, or reviews files in your IDE that contain uncommitted changes, your monthly quota of Copilot premium requests is reduced by one. Code review for currently selected text in {% data variables.product.prodname_vscode_shortname %} does not consume a premium request. For information about premium requests, see [AUTOTITLE](/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests).
Each time {% data variables.product.prodname_copilot_short %} reviews a pull request, or reviews code in your IDE, your monthly quota of Copilot premium requests is reduced by one.

If a repository is configured to automatically request a code review from {% data variables.product.prodname_copilot_short %} for all new pull requests, the premium request usage is applied to the quota of the pull request author. If a pull request is created by {% data variables.product.prodname_actions %} or by a bot, the usage will apply to the user who triggered the workflow (if identifiable), or to a designated billing owner.

Expand All @@ -81,17 +79,6 @@ When you reach your monthly quota you will not be able to get a code review from

{% data reusables.copilot.ccr-model-settings %}

## {% data variables.copilot.copilot_code-review_short %} in {% data variables.product.prodname_vscode %}

{% data variables.copilot.copilot_code-review_short %} in {% data variables.product.prodname_vscode %} supports two types of review:

* **Review selection:**
* Highlight code and ask for an initial review.
* Standard {% data variables.product.prodname_copilot_short %} feature. No premium requests used.
* **Review changes:**
* Request a deeper review of all of your uncommitted changes.
* Premium feature. Uses one premium request from your monthly quota per review.

## Providing instructions for {% data variables.product.prodname_copilot_short %} code reviews

You can tailor the reviews that {% data variables.product.prodname_copilot_short %} generates by providing custom instructions. This helps {% data variables.product.prodname_copilot_short %} to review the code in a way that matches your team's coding standards, tools, and practices. See [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=webui) and [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-organization-instructions).
Expand Down
18 changes: 18 additions & 0 deletions content/copilot/concepts/prompting/response-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ category:

{% data variables.product.prodname_copilot %} can provide responses that are tailored to your personal preferences, the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your prompts, you can create custom instructions that automatically add this information for you. The additional information is not displayed, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses.

{% data reusables.copilot.custom-insts-nondeterministic %}

## Types of custom instructions

There are three main types of custom instructions that you can use to customize {% data variables.product.prodname_copilot_short %} responses on the {% data variables.product.github %} website:
Expand Down Expand Up @@ -122,6 +124,8 @@ There are two types of files you can use to provide context and instructions to

While custom instructions help to add codebase-wide context to each AI workflow, prompt files let you add instructions to a specific chat interaction.

{% data reusables.copilot.custom-insts-nondeterministic %}

## About repository custom instructions

You can use three types of repository custom instructions in {% data variables.product.prodname_vscode_shortname %}:
Expand Down Expand Up @@ -179,11 +183,14 @@ The following examples demonstrate how to use prompt files.
```

For information on how to enable, create, and use prompt files, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=vscode#enabling-and-using-prompt-files).

{% data reusables.copilot.custom-instructions-effective %}

## Next steps

* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
* [AUTOTITLE](/copilot/tutorials/use-custom-instructions)

{% endvscode %}

Expand All @@ -199,6 +206,8 @@ The following examples demonstrate how to use prompt files.

{% data variables.product.prodname_copilot %} can provide responses that are tailored to the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your prompts, you can create a custom instructions file in your repository that automatically adds this information for you. The additional information is not displayed in the chat input box, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses.

{% data reusables.copilot.custom-insts-nondeterministic %}

## About repository custom instructions

In {% data variables.product.prodname_vs %}, repository custom instructions consist of a single file, `.github/copilot-instructions.md`, that you create in a repository. The instructions you add to the file should be short, self-contained statements that add context or relevant information to supplement a {% data variables.product.prodname_copilot_short %} prompt.
Expand Down Expand Up @@ -246,6 +255,8 @@ There are two types of files you can use to provide context and instructions to

While custom instructions help to add codebase-wide context to each AI workflow, prompt files let you add instructions to a specific chat interaction.

{% data reusables.copilot.custom-insts-nondeterministic %}

## About repository custom instructions

In JetBrains IDEs, repository custom instructions consist of a single file, `.github/copilot-instructions.md`, that you create in a repository. The instructions you add to the file should be short, self-contained statements that add context or relevant information to supplement a {% data variables.product.prodname_copilot_short %} prompt.
Expand Down Expand Up @@ -322,6 +333,7 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi
## Next steps

* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
* [AUTOTITLE](/copilot/tutorials/use-custom-instructions)

{% endjetbrains %}

Expand All @@ -337,6 +349,8 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi

{% data variables.product.prodname_copilot %} can provide responses that are tailored to the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your prompts, you can create a custom instructions file in your repository that automatically adds this information for you. The additional information is not displayed in the chat input box, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses.

{% data reusables.copilot.custom-insts-nondeterministic %}

## About repository custom instructions

In Xcode, repository custom instructions consist of a single file, `.github/copilot-instructions.md`, that you create in a repository. The instructions you add to the file should be short, self-contained statements that add context or relevant information to supplement a {% data variables.product.prodname_copilot_short %} prompt.
Expand All @@ -362,6 +376,7 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi
## Next steps

* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
* [AUTOTITLE](/copilot/tutorials/use-custom-instructions)

{% endxcode %}

Expand All @@ -382,6 +397,8 @@ There are two types of repository custom instructions you can use to provide con
* **Workspace custom instructions** which apply to all projects in a workspace, and allow you to specify workspace-wide instructions and preferences, in a single file.
* **Project custom instructions** which apply to a specific project.

{% data reusables.copilot.custom-insts-nondeterministic %}

## About repository custom instructions

**Workspace custom instructions** apply to all projects in a workspace, and allow you to specify workspace-wide instructions and preferences. You can use workspace custom instructions to provide context and instructions to {% data variables.product.prodname_copilot_short %} in Eclipse.
Expand All @@ -405,6 +422,7 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi
## Next steps

* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
* [AUTOTITLE](/copilot/tutorials/use-custom-instructions)

{% endeclipse %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ Once prompt files are saved, their instructions will apply to the current worksp

## Further reading

* [AUTOTITLE](/copilot/tutorials/use-custom-instructions)
* [AUTOTITLE](/copilot/tutorials/customization-library/custom-instructions)—a curated collection of examples

{% endcopilotcli %}
12 changes: 10 additions & 2 deletions data/reusables/copilot/custom-instructions-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@
---
```

To apply the instructions to all files, use `applyTo: "**"`, `applyTo: "*"`, or `applyTo: "**/*"`.
Glob examples:

* `*` - will all match all files in the current directory.
* `**` or `**/*` - will all match all files in all directories.
* `*.py` - will match all `.py` files in the current directory.
* `**/*.py` - will recursively match all `.py` files in all directories.
* `src/*.py` - will match all `.py` files in the `src` directory. For example, `src/foo.py` and `src/bar.py` but _not_ `src/foo/bar.py`.
* `src/**/*.py` - will recursively match all `.py` files in the `src` directory. For example, `src/foo.py`, `src/foo/bar.py`, and `src/foo/bar/baz.py`.
* `**/subdir/**/*.py` - will recursively match all `.py` files in any `subdir` directory at any depth. For example, `subdir/foo.py`, `subdir/nested/bar.py`, `parent/subdir/baz.py`, and `deep/parent/subdir/nested/qux.py`, but _not_ `foo.py` at a path that does not contain a `subdir` directory.

1. Optionally, to prevent the file from being used by either {% data variables.copilot.copilot_coding_agent %} or {% data variables.copilot.copilot_code-review_short %}, add the `excludeAgent` keyword to the frontmatter block. Use either `"code-review"` or `"coding-agent"`.

For example, the following file will only be read by {% data variables.copilot.copilot_coding_agent %}.

```markdown
---
applyTo: "**"
Expand Down
2 changes: 2 additions & 0 deletions data/reusables/copilot/custom-insts-nondeterministic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!NOTE]
> Due to the non-deterministic nature of AI, {% data variables.product.prodname_copilot_short %} may not always follow your custom instructions in exactly the same way every time they are used.