Skip to content

Commit 33dfcc3

Browse files
authored
Add note about branch for custom instructions in CCR (#59942)
1 parent 30b188f commit 33dfcc3

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ Custom instructions are enabled for {% data variables.copilot.copilot_code-revie
182182
1. In the "Code & automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**, then **Code review**.
183183
1. Toggle the “Use custom instructions when reviewing pull requests” option on or off.
184184

185+
> [!NOTE]
186+
> {% data reusables.copilot.code-review.custom-instructions-branch %}
187+
185188
## Further reading
186189

187190
* [AUTOTITLE](/copilot/reference/custom-instructions-support)

content/copilot/tutorials/use-custom-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ Before writing custom instructions, it's helpful to understand how {% data varia
4343
* **Context limits**: Very long instruction files may result in some instructions being overlooked.
4444
* **Specificity matters**: Clear, specific instructions work better than vague directives.
4545

46-
{% data reusables.copilot.code-review.custom-instructions-limit %}
47-
4846
Keep these factors in mind as you write your instructions—they'll help you set realistic expectations and write more effective guidance.
4947

48+
{% data reusables.copilot.code-review.custom-instructions-limit %}
49+
5050
## Writing effective custom instructions
5151

5252
The key to successful custom instructions is to be clear, concise, and specific. Here are the core principles to follow:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
When reviewing a pull request, {% data variables.product.prodname_copilot_short %} uses the custom instructions in the base branch of the pull request. For example, if your pull request seeks to merge `my-feature-branch` into `main`, {% data variables.product.prodname_copilot_short %} will use the custom instructions in `main`.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
> [!NOTE]
2-
> {% data variables.copilot.copilot_code-review_short %} only reads the first 4,000 characters of any custom instruction file. Any instructions beyond this limit will not affect the reviews generated by {% data variables.copilot.copilot_code-review_short %}. This limit does not apply to {% data variables.copilot.copilot_chat_short %} or {% data variables.copilot.copilot_coding_agent %}.
2+
> * {% data variables.copilot.copilot_code-review_short %} only reads the first 4,000 characters of any custom instruction file. Any instructions beyond this limit will not affect the reviews generated by {% data variables.copilot.copilot_code-review_short %}. This limit does not apply to {% data variables.copilot.copilot_chat_short %} or {% data variables.copilot.copilot_coding_agent %}.
3+
> * {% data reusables.copilot.code-review.custom-instructions-branch %}

0 commit comments

Comments
 (0)