Skip to content

Commit 3542e3e

Browse files
authored
Merge pull request #45005 from github/repo-sync
Repo sync
2 parents 830f34a + af94b51 commit 3542e3e

28 files changed

Lines changed: 453 additions & 107 deletions

File tree

content/code-security/concepts/about-code-quality.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ With {% data variables.product.prodname_code_quality_short %}, you can:
2929
* Review clear explanations for findings and apply one-click **{% data variables.product.prodname_copilot_short %}-powered autofixes**.
3030
* Use **repository dashboards** to track reliability and maintainability scores, identify areas needing attention, and prioritize remediation.
3131
* Monitor **organization dashboards** to understand the code health of your repositories at a glance and determine which repositories to investigate further.
32-
* Set up **rulesets** for pull requests to enforce code quality standards and block changes that do not meet your criteria.
32+
* Set up **rulesets** for pull requests to enforce code quality standards and block changes that do not meet your criteria. You can also enforce coverage thresholds with rulesets to block pull requests that don't meet a minimum coverage percentage or that cause coverage to drop by more than the allowed amount.
3333
* Upload **code coverage** reports to see test coverage metrics directly on pull requests, helping reviewers identify untested code.
3434
* Easily assign remediation work to **{% data variables.copilot.copilot_cloud_agent %}**, if you have a {% data variables.product.prodname_copilot_short %} license.
3535

content/code-security/how-tos/maintain-quality-code/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ children:
1212
- /set-up-code-coverage
1313
- /interpret-results
1414
- /set-pr-thresholds
15+
- /restrict-code-coverage
1516
- /unblock-your-pr
1617
redirect_from:
1718
- /code-security/code-quality/how-tos
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Restricting code coverage on pull requests
3+
shortTitle: Restrict code coverage
4+
intro: Protect your test coverage by automatically blocking pull requests that fall below the coverage levels your team requires.
5+
versions:
6+
feature: code-quality
7+
permissions: '{% data reusables.permissions.code-quality-repo-enable %}'
8+
contentType: how-tos
9+
category:
10+
- Improve code quality
11+
---
12+
13+
> [!NOTE]
14+
> This feature is in {% data variables.release-phases.public_preview %} and subject to change.
15+
16+
## Prerequisites
17+
18+
* {% data variables.product.prodname_code_quality %} is enabled on the repository.
19+
* Code coverage data is uploaded to {% data variables.product.github %} for the pull request branch. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/set-up-code-coverage).
20+
21+
## Creating a coverage threshold rule
22+
23+
{% data reusables.repositories.navigate-to-repo %}
24+
{% data reusables.repositories.sidebar-settings %}
25+
{% data reusables.repositories.repo-rulesets-settings %}
26+
1. Create a new branch ruleset or click an existing one to edit it.
27+
1. Under "Branch rules", select **Restrict code coverage**.
28+
1. Expand **Additional settings** to configure thresholds. A value of 0 means that the threshold is disabled.
29+
30+
* **Minimum coverage percentage**: enter a value to block pull requests where aggregated coverage falls below this percentage.
31+
* **Maximum coverage drop**: enter a value to block pull requests where coverage drops by more than this many percentage points relative to the default branch.
32+
33+
1. Click **Create** or **Save changes**.
34+
35+
{% ifversion repo-rules-enterprise %}
36+
37+
> [!TIP]
38+
> Consider setting your ruleset to **Evaluate** mode before switching to **Active**. This lets you observe which pull requests would have been blocked without enforcing the rule, giving you a chance to calibrate your thresholds.
39+
{% endif %}

content/code-security/how-tos/maintain-quality-code/set-up-code-coverage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,4 @@ jobs:
127127
## Next steps
128128

129129
* **Interpret results:** Understand coverage metrics and per-file breakdowns on your pull requests. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/interpret-results).
130+
* **Enforce coverage thresholds:** Block pull requests that don't meet a minimum coverage percentage or that cause coverage to drop. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/restrict-code-coverage).

content/code-security/how-tos/maintain-quality-code/unblock-your-pr.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Resolving a block on your pull request
33
shortTitle: Unblock your PR
4-
intro: Identify and resolve a code quality block on your pull request so you can merge your changes.
4+
intro: Identify and resolve a code quality or coverage threshold block on your pull request so you can merge your changes.
55
versions:
66
feature: code-quality
77
permissions: '{% data reusables.permissions.code-quality-see-repo-findings %}'
@@ -16,10 +16,14 @@ category:
1616

1717
## Understanding why your pull request is blocked
1818

19-
Repository administrators can set code quality gates for maintainability and reliability using {% data variables.product.prodname_code_quality %}. When you open a pull request, a scan automatically runs to check your changes against these standards.
19+
Repository administrators can set quality gates using {% data variables.product.prodname_code_quality %}. When you open a pull request, checks automatically run to evaluate your changes against these standards.
2020

21-
If your pull request introduces code that falls below the required quality threshold, you’ll see a merge block banner at the bottom of the pull request in the Checks section:
22-
"Merging is blocked: Code quality findings were detected."
21+
There are two types of blocks:
22+
23+
* **Code quality findings**: your changes introduce issues that fall below the required quality threshold.
24+
* **Coverage threshold**: your changes cause code coverage to fall below a required minimum, or cause coverage to drop by more than a permitted amount relative to the default branch.
25+
26+
If your pull request introduces code that falls below the required quality threshold, you'll see a merge block banner at the bottom of the pull request in the "Checks" section: "Merging is blocked: Code quality findings were detected."
2327

2428
![Screenshot of the merge block banner in the Checks section of a pull request.](/assets/images/help/code-quality/code-quality-merge-block.png)
2529

@@ -64,6 +68,19 @@ In order to unblock your pull request, you need to resolve each required finding
6468

6569
To see if you've met the code quality requirements, look at the "Checks" section at the bottom of your pull request. The merge block banner should no longer be present, and you should be able to merge your changes as usual.
6670

71+
## Resolving a coverage threshold block
72+
73+
If your pull request is blocked by a coverage threshold rule, you'll see a merge block banner in the "Checks" section with a message describing which threshold was not met. For example:
74+
75+
* "Coverage 22.0% is below minimum 50.0%": your pull request branch coverage is below the minimum coverage percentage configured in the ruleset.
76+
* "Coverage decreased by 2.5%, maximum allowed drop is 1.0%": your changes caused coverage to drop by more than the permitted amount relative to the default branch.
77+
78+
To unblock your pull request, you need to add or modify tests so that more of the codebase is executed:
79+
80+
1. Review the coverage summary comment on your pull request to identify which files or areas lack coverage.
81+
1. Add or update tests to increase execution coverage.
82+
1. Push your changes. The coverage check will re-run automatically.
83+
6784
## Next steps
6885

6986
Reduce technical debt by fixing findings in recently changed files. See [AUTOTITLE](/code-security/code-quality/tutorials/improve-recent-merges).
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Using GitHub Copilot in JetBrains IDEs
3+
shortTitle: Copilot in JetBrains
4+
intro: 'Learn about the different ways to use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_jetbrains_ides %}, including the {% data variables.product.prodname_copilot %} plugin, JetBrains AI Assistant, and {% data variables.copilot.copilot_cli_short %}.'
5+
versions:
6+
feature: copilot
7+
contentType: concepts
8+
category:
9+
- Learn about Copilot
10+
allowTitleToDifferFromFilename: true
11+
---
12+
13+
## Introduction
14+
15+
There are three ways to use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_jetbrains_ides %}: the {% data variables.product.prodname_copilot %} plugin, {% data variables.product.prodname_copilot %} as an agent in JetBrains AI Assistant, and {% data variables.copilot.copilot_cli %} in the integrated terminal. Each entry point provides a different set of capabilities depending on how you prefer to work.
16+
17+
## Comparing entry points
18+
19+
| | {% data variables.product.prodname_copilot %} plugin | {% data variables.product.prodname_copilot %} in AI Assistant | {% data variables.copilot.copilot_cli_short %} |
20+
|---|---|---|---|
21+
| **Best for** | Comprehensive AI coding workflow | Quick {% data variables.product.prodname_copilot_short %} access without a separate plugin | Terminal-first workflows |
22+
| **Entry point** | Chat panel, inline chat, code suggestions, code review, commit message | Default agent picker, ACP Registry | Terminal or shell |
23+
| **Code completion** | Yes | Not included | Not included |
24+
| **Next edit suggestions** | Yes | Coming soon | Not included |
25+
| **Agentic experience** | Multiple agent harnesses | {% data variables.product.prodname_copilot_short %} as agent via ACP, Default agent picker | {% data variables.copilot.copilot_cli_short %} |
26+
| **IDE tools** | Yes | Yes | Not included |
27+
| **Model selection** | Yes | Yes | Yes |
28+
| **Inline chat** | Yes | Not included | Not included |
29+
| **Code review** | Yes | Not included | Not included |
30+
| **Commit message generation** | Yes | Not included | Not included |
31+
| **Subscription** | {% data variables.product.prodname_copilot %} | {% data variables.product.prodname_copilot %} | {% data variables.product.prodname_copilot %} |
32+
33+
## {% data variables.product.prodname_copilot %} plugin
34+
35+
The {% data variables.product.prodname_copilot %} plugin for {% data variables.product.prodname_jetbrains_ides %} is the most comprehensive way to use {% data variables.product.prodname_copilot_short %} and is the recommended choice.
36+
37+
The plugin is transitioning from its local agent harness to {% data variables.copilot.copilot_cli_short %} as the default agent harness, which brings faster feature parity and higher-quality results. For more information, see [{% data variables.copilot.copilot_cli_short %} is becoming the default agent harness in {% data variables.product.prodname_copilot %} for JetBrains](https://devblogs.microsoft.com/java/github-copilot-for-jetbrains-is-moving-to-copilot-cli-as-the-default-agent-harness/). For installation instructions, see [AUTOTITLE](/copilot/how-tos/set-up/install-copilot-extension).
38+
39+
* **Code completion and next edit suggestions**: {% data variables.product.prodname_copilot_short %} suggests completions as you type and proactively predicts your next intended edit.
40+
* **Multiple agent harnesses**: The plugin ships its own agent experience and partners with other agent providers, giving you multiple interaction modes.
41+
* **Full model and feature support**: All {% data variables.copilot.copilot_chat_short %} models, code completion modes, and bring-your-own-key features are available as they are released.
42+
* **Inline chat**: Explain, refactor, document, or generate code directly in the editor gutter, without switching to a separate panel.
43+
* **Code review**: {% data variables.product.prodname_copilot_short %} analyzes your changes and surfaces actionable feedback, flagging potential bugs, style violations, and logic issues.
44+
* **Commit message generation**: {% data variables.product.prodname_copilot_short %} inspects your staged changes and generates a clear, conventional commit message.
45+
46+
## {% data variables.product.prodname_copilot %} in JetBrains AI Assistant
47+
48+
> [!NOTE]
49+
> {% data variables.product.prodname_copilot %} in AI Assistant provides chat and agent capabilities only. It does not include code completion, next edit suggestions, inline chat, code review, or commit message generation.
50+
51+
{% data variables.product.prodname_copilot %} is available as a native agent in JetBrains AI Assistant through the Agent Client Protocol (ACP). The ACP is an open standard for connecting AI agents to the IDE. If you have a valid {% data variables.product.prodname_copilot_short %} subscription, {% data variables.product.prodname_copilot_short %} appears in the AI Assistant agent picker automatically.
52+
53+
This integration is designed for developers who prefer to work inside the AI Assistant chat panel or who want {% data variables.product.prodname_copilot_short %} available without installing an additional plugin.
54+
55+
* **No updates required**: The {% data variables.product.prodname_copilot_short %} agent is bundled directly with AI Assistant and kept current automatically. No separate plugin to install, update, or maintain.
56+
* **Chat-centric workflow**: Ideal for multi-step reasoning tasks—describe a goal, let {% data variables.product.prodname_copilot_short %} plan and propose changes, and iterate conversationally.
57+
* **Model selection**: Switch {% data variables.product.prodname_copilot_short %} models or adjust reasoning depth without leaving the chat panel.
58+
59+
### Using {% data variables.product.prodname_copilot %} in AI Assistant
60+
61+
1. Open JetBrains AI Assistant by pressing <kbd>Alt</kbd>+<kbd>A</kbd> (Windows/Linux) or <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> (macOS), or click the AI Assistant icon in the right tool window.
62+
1. In the agent picker dropdown at the top of the chat panel, select **{% data variables.product.prodname_copilot %}**.
63+
1. Enter a prompt and start chatting.
64+
65+
### The ACP Registry
66+
67+
The ACP Registry is the catalog of agents that AI Assistant knows about. When the IDE starts, it consults the registry to discover which agents are available. {% data variables.product.prodname_copilot %}'s ACP entry is part of the default registry, so {% data variables.product.prodname_copilot_short %} appears in your agent list automatically when you have a valid subscription and the required credentials in place.
68+
69+
For more information about ACP, see the [ACP documentation](https://agentclientprotocol.com/get-started/introduction). For technical details on running {% data variables.copilot.copilot_cli_short %} as an ACP server, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/acp-server).
70+
71+
## {% data variables.copilot.copilot_cli %} in the integrated terminal
72+
73+
{% data variables.copilot.copilot_cli %} brings {% data variables.product.prodname_copilot_short %}'s capabilities directly to the terminal. It is optimized for command-line workflows and can run on macOS, Linux, or Windows.
74+
75+
## Further reading
76+
77+
* [AUTOTITLE](/copilot/how-tos/chat-with-copilot/chat-in-ide)
78+
* [AUTOTITLE](/copilot/how-tos/set-up/install-copilot-extension)
79+
* [AUTOTITLE](/copilot/how-tos/use-ai-models/change-the-chat-model)

content/copilot/concepts/agents/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ children:
99
- /cloud-agent
1010
- /copilot-cli
1111
- /github-copilot-app
12+
- /copilot-in-jetbrains
1213
- /code-review
1314
- /about-github-agentic-workflows
1415
- /copilot-memory

content/copilot/concepts/models/auto-model-selection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ More than just a model picker, {% data variables.copilot.copilot_auto_model_sele
1919

2020
### Auto with task optimization
2121

22-
> [!NOTE] {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} with task optimization is generally available in {% data variables.copilot.copilot_chat_short %} on the {% data variables.product.github %} website and in {% data variables.product.prodname_vscode_shortname %}.
22+
> [!NOTE] {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} with task optimization is generally available in {% data variables.copilot.copilot_chat_short %} on the {% data variables.product.github %} website, in {% data variables.product.prodname_vscode_shortname %}, and in {% data variables.copilot.copilot_cli_short %}.
2323
2424
{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} with task optimization combines two systems to provide high quality results and better reliability. One system tracks real-time system health and availability, while the other evaluates task complexity. Putting these together, {% data variables.copilot.copilot_auto_model_selection_short %} routes the task to the optimal model.
2525

@@ -60,7 +60,7 @@ When you select **Auto**, {% data variables.copilot.copilot_auto_model_selection
6060

6161
## {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} in {% data variables.product.prodname_copilot_short %}
6262

63-
{% data variables.copilot.copilot_auto_model_selection_short_cap_a %}, optimized for model reliability and availability, is available in these {% data variables.product.prodname_copilot_short %} products:
63+
{% data variables.copilot.copilot_auto_model_selection_short_cap_a %}, optimized for model reliability and availability, is available in these {% data variables.product.prodname_copilot_short %} products:
6464
* {% data variables.copilot.copilot_chat_short %}, on the {% data variables.product.github %} website and supported IDEs
6565
* {% data variables.copilot.copilot_cli_short %}
6666
* {% data variables.copilot.copilot_cloud_agent %}

content/copilot/how-tos/chat-with-copilot/chat-in-ide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ The following agents are available:
384384
* **{% data variables.copilot.copilot_cli_short %}**: Runs {% data variables.product.prodname_copilot_short %} through {% data variables.copilot.copilot_cli_short %}, providing a terminal-first agentic experience with support for multiple isolation modes, live session progress, and tool call visibility. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/about-copilot-cli).
385385
* **Custom agents**: Use personalized agents tailored to your specific needs. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/about-custom-agents).
386386

387+
> [!TIP]
388+
> You can also access {% data variables.product.prodname_copilot_short %} from JetBrains AI Assistant without installing the {% data variables.product.prodname_copilot_short %} plugin. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-in-jetbrains).
389+
387390
## Submitting prompts
388391

389392
You can ask {% data variables.copilot.copilot_chat_short %} to give you code suggestions, explain code, generate unit tests, and suggest code fixes.

content/copilot/how-tos/copilot-cli/cli-best-practices.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ Use `/model` to choose from available models based on your task complexity:
9494

9595
| Model | Best For | Tradeoffs |
9696
| ----- | -------- | --------- |
97-
| **Auto** | Reduced rate limiting and lower latency and errors | See [AUTOTITLE](/copilot/concepts/auto-model-selection#auto-model-selection-in-github-copilot-cli)|
97+
| **Auto** | Reduced rate limiting and lower latency and errors | See [AUTOTITLE](/copilot/concepts/auto-model-selection) |
9898
| **Claude Opus 4.5** (default) | Complex architecture, difficult debugging, nuanced refactoring | Most capable but more costly |
9999
| **Claude Sonnet 4.5** | Day-to-day coding, most routine tasks | Fast, cost-effective, handles most work well |
100100
| **GPT-5.2 Codex** | Code generation, code review, straightforward implementations | Excellent for reviewing code produced by other models |
101101

102102
**Recommendations:**
103103

104-
* **Auto** intelligently chooses models based on real time system health and model performance, reducing rate limiting and providing lower latency and errors.
104+
* **Auto** intelligently chooses models based on real-time system health and model performance (reducing rate limiting and providing lower latency and errors), and the complexity of the task you have given {% data variables.product.prodname_copilot_short %}.
105105
* **Opus 4.5** is ideal for tasks requiring deep reasoning, complex system design, subtle bug investigation, or extensive context understanding.
106106
* **Switch to Sonnet 4.5** for routine tasks where speed and cost efficiency matter—it handles the majority of everyday coding effectively.
107107
* **Use Codex** for high-volume code generation and as a second opinion for reviewing code produced by other models.

0 commit comments

Comments
 (0)