From 9d6d18d2d68c128c3c14a45bab6398362ce0401c Mon Sep 17 00:00:00 2001 From: Sarah Schneider Date: Wed, 8 Apr 2026 15:58:50 -0400 Subject: [PATCH 1/2] Add linter to enforce docsTeamMetrics frontmatter (#60676) --- .../agents/copilot-cli/about-cli-plugins.md | 2 + .../agents/copilot-cli/about-copilot-cli.md | 2 + .../agents/copilot-cli/about-custom-agents.md | 2 + .../concepts/agents/copilot-cli/autopilot.md | 2 + .../concepts/agents/copilot-cli/chronicle.md | 2 + .../copilot-cli/comparing-cli-features.md | 2 + .../concepts/agents/copilot-cli/fleet.md | 2 + .../concepts/agents/copilot-cli/index.md | 2 + .../concepts/agents/copilot-cli/research.md | 2 + ...inister-copilot-cli-for-your-enterprise.md | 2 + .../how-tos/copilot-cli/allowing-tools.md | 2 + .../automate-with-actions.md | 2 + .../copilot-cli/automate-copilot-cli/index.md | 2 + .../automate-copilot-cli/quickstart.md | 2 + .../run-cli-programmatically.md | 2 + .../copilot/how-tos/copilot-cli/chronicle.md | 2 + .../how-tos/copilot-cli/cli-best-practices.md | 2 + .../copilot-cli/cli-getting-started.md | 2 + .../how-tos/copilot-cli/connecting-vs-code.md | 2 + .../add-custom-instructions.md | 2 + .../customize-copilot/add-mcp-servers.md | 2 + .../create-custom-agents-for-cli.md | 2 + .../customize-copilot/create-skills.md | 2 + .../copilot-cli/customize-copilot/index.md | 2 + .../copilot-cli/customize-copilot/overview.md | 2 + .../customize-copilot/plugins-creating.md | 2 + .../plugins-finding-installing.md | 2 + .../customize-copilot/plugins-marketplace.md | 2 + .../customize-copilot/use-byok-models.md | 2 + .../customize-copilot/use-hooks.md | 4 +- content/copilot/how-tos/copilot-cli/index.md | 2 + .../authenticate-copilot-cli.md | 2 + .../configure-copilot-cli.md | 2 + .../copilot-cli/set-up-copilot-cli/index.md | 3 +- .../set-up-copilot-cli/install-copilot-cli.md | 2 + .../troubleshoot-copilot-cli-auth.md | 2 + .../speeding-up-task-completion.md | 2 + .../agentic-code-review.md | 4 +- .../delegate-tasks-to-cca.md | 2 + .../use-copilot-cli-agents/index.md | 2 + .../invoke-custom-agents.md | 2 + .../use-copilot-cli-agents/overview.md | 2 + .../use-copilot-cli-agents/steer-agents.md | 4 +- .../copilot-cli-reference/acp-server.md | 2 + .../cli-command-reference.md | 2 + .../cli-config-dir-reference.md | 2 + .../cli-plugin-reference.md | 2 + .../cli-programmatic-reference.md | 2 + .../reference/copilot-cli-reference/index.md | 2 + .../copilot/responsible-use/copilot-cli.md | 2 + .../copilot/tutorials/copilot-cli-hooks.md | 2 + .../contributing/content-linter-rules.md | 1 + .../frontmatter-docs-team-metrics.ts | 42 +++++++++++++++++++ src/content-linter/lib/linting-rules/index.ts | 2 + src/content-linter/style/github-docs.ts | 6 +++ .../unit/frontmatter-docs-team-metrics.ts | 40 ++++++++++++++++++ 56 files changed, 196 insertions(+), 4 deletions(-) create mode 100644 src/content-linter/lib/linting-rules/frontmatter-docs-team-metrics.ts create mode 100644 src/content-linter/tests/unit/frontmatter-docs-team-metrics.ts diff --git a/content/copilot/concepts/agents/copilot-cli/about-cli-plugins.md b/content/copilot/concepts/agents/copilot-cli/about-cli-plugins.md index 94816f50b557..d91aa7bcf699 100644 --- a/content/copilot/concepts/agents/copilot-cli/about-cli-plugins.md +++ b/content/copilot/concepts/agents/copilot-cli/about-cli-plugins.md @@ -10,6 +10,8 @@ contentType: concepts category: - Learn about Copilot # Copilot discovery page - Learn about Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- Plugins provide a way to distribute custom CLI functionality. You can use a plugin to add a preconfigured set of capabilities to {% data variables.copilot.copilot_cli_short %}. diff --git a/content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md b/content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md index 30968d22d31d..90b1964a61b7 100644 --- a/content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md +++ b/content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md @@ -12,6 +12,8 @@ category: - Learn about Copilot CLI # Copilot CLI bespoke page redirect_from: - /copilot/concepts/agents/about-copilot-cli +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md b/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md index e7156169d8e3..80eb99f5a364 100644 --- a/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md +++ b/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md @@ -7,6 +7,8 @@ versions: category: - Learn about Copilot contentType: concepts +docsTeamMetrics: + - copilot-cli --- {% data reusables.copilot.copilot-cli.custom-agents-about-intro %} diff --git a/content/copilot/concepts/agents/copilot-cli/autopilot.md b/content/copilot/concepts/agents/copilot-cli/autopilot.md index 87b8c32cfd1b..5a0c69beefcf 100644 --- a/content/copilot/concepts/agents/copilot-cli/autopilot.md +++ b/content/copilot/concepts/agents/copilot-cli/autopilot.md @@ -9,6 +9,8 @@ contentType: concepts category: - Learn about Copilot CLI # Copilot CLI bespoke page - Learn about Copilot # Copilot discovery page +docsTeamMetrics: + - copilot-cli --- ## Overview diff --git a/content/copilot/concepts/agents/copilot-cli/chronicle.md b/content/copilot/concepts/agents/copilot-cli/chronicle.md index 68d7f4115041..8d6b2f5480c6 100644 --- a/content/copilot/concepts/agents/copilot-cli/chronicle.md +++ b/content/copilot/concepts/agents/copilot-cli/chronicle.md @@ -9,6 +9,8 @@ contentType: concepts category: - Learn about Copilot # Copilot discovery page - Learn about Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/concepts/agents/copilot-cli/comparing-cli-features.md b/content/copilot/concepts/agents/copilot-cli/comparing-cli-features.md index 4924e525038f..43f725b0ad1d 100644 --- a/content/copilot/concepts/agents/copilot-cli/comparing-cli-features.md +++ b/content/copilot/concepts/agents/copilot-cli/comparing-cli-features.md @@ -9,6 +9,8 @@ contentType: concepts category: - Learn about Copilot # Copilot discovery page - Learn about Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/concepts/agents/copilot-cli/fleet.md b/content/copilot/concepts/agents/copilot-cli/fleet.md index 3b808f97dcc4..f91ba448f606 100644 --- a/content/copilot/concepts/agents/copilot-cli/fleet.md +++ b/content/copilot/concepts/agents/copilot-cli/fleet.md @@ -9,6 +9,8 @@ contentType: concepts category: - Learn about Copilot # Copilot discovery page - Learn about Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/concepts/agents/copilot-cli/index.md b/content/copilot/concepts/agents/copilot-cli/index.md index 3ec83c0899d5..2ba42405ebb7 100644 --- a/content/copilot/concepts/agents/copilot-cli/index.md +++ b/content/copilot/concepts/agents/copilot-cli/index.md @@ -15,4 +15,6 @@ children: - /research - /chronicle contentType: concepts +docsTeamMetrics: + - copilot-cli --- diff --git a/content/copilot/concepts/agents/copilot-cli/research.md b/content/copilot/concepts/agents/copilot-cli/research.md index f8fb455690a8..ad4eee30ebaf 100644 --- a/content/copilot/concepts/agents/copilot-cli/research.md +++ b/content/copilot/concepts/agents/copilot-cli/research.md @@ -9,6 +9,8 @@ contentType: concepts category: - Learn about Copilot # Copilot discovery page - Learn about Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/administer-copilot-cli-for-your-enterprise.md b/content/copilot/how-tos/copilot-cli/administer-copilot-cli-for-your-enterprise.md index 29a94206e36e..857d2561c6db 100644 --- a/content/copilot/how-tos/copilot-cli/administer-copilot-cli-for-your-enterprise.md +++ b/content/copilot/how-tos/copilot-cli/administer-copilot-cli-for-your-enterprise.md @@ -9,6 +9,8 @@ allowTitleToDifferFromFilename: true category: - Manage Copilot for a team # Copilot discovery page - Administer Copilot CLI # Copilot CLI bespoke landing page +docsTeamMetrics: + - copilot-cli --- ## Enabling or disabling {% data variables.copilot.copilot_cli_short %} diff --git a/content/copilot/how-tos/copilot-cli/allowing-tools.md b/content/copilot/how-tos/copilot-cli/allowing-tools.md index 11ec8ded6d84..362c0187c3d6 100644 --- a/content/copilot/how-tos/copilot-cli/allowing-tools.md +++ b/content/copilot/how-tos/copilot-cli/allowing-tools.md @@ -8,6 +8,8 @@ contentType: how-tos category: - Author and optimize with Copilot # Copilot discovery page - Build with Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/automate-with-actions.md b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/automate-with-actions.md index fb28e66dfde5..79017f210813 100644 --- a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/automate-with-actions.md +++ b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/automate-with-actions.md @@ -11,6 +11,8 @@ category: - Author and optimize with Copilot redirect_from: - /copilot/how-tos/copilot-cli/automate-with-actions +docsTeamMetrics: + - copilot-cli --- You can run {% data variables.copilot.copilot_cli %} in a {% data variables.product.prodname_actions %} workflow to automate AI-powered tasks as part of your CI/CD process. For example, you can summarize recent repository activity, generate reports, or scaffold project content. {% data variables.copilot.copilot_cli %} runs on the Actions runner like any other CLI tool, so you can install it during a job and invoke it from workflow steps. diff --git a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/index.md b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/index.md index 7affae6ec93d..231b11e11593 100644 --- a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/index.md +++ b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/index.md @@ -9,4 +9,6 @@ children: - /quickstart - /run-cli-programmatically - /automate-with-actions +docsTeamMetrics: + - copilot-cli --- diff --git a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/quickstart.md b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/quickstart.md index 9013e0fa8dc6..691efbb92281 100644 --- a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/quickstart.md +++ b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/quickstart.md @@ -12,6 +12,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Build with Copilot CLI # Copilot CLI bespoke page - Quickstarts +docsTeamMetrics: + - copilot-cli --- ## Overview diff --git a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md index 35feb33747a1..984602bd13e7 100644 --- a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md +++ b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md @@ -9,6 +9,8 @@ contentType: how-tos category: - Author and optimize with Copilot # Copilot discovery page - Build with Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/chronicle.md b/content/copilot/how-tos/copilot-cli/chronicle.md index 1ff12a17bb42..557a148d29a1 100644 --- a/content/copilot/how-tos/copilot-cli/chronicle.md +++ b/content/copilot/how-tos/copilot-cli/chronicle.md @@ -9,6 +9,8 @@ contentType: how-tos category: - Author and optimize with Copilot # Copilot discovery page - Build with Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- {% data variables.copilot.copilot_cli_short %} stores the data from your CLI sessions locally on your machine. This session data allows you to: diff --git a/content/copilot/how-tos/copilot-cli/cli-best-practices.md b/content/copilot/how-tos/copilot-cli/cli-best-practices.md index e0e9b561e67d..11e42282708c 100644 --- a/content/copilot/how-tos/copilot-cli/cli-best-practices.md +++ b/content/copilot/how-tos/copilot-cli/cli-best-practices.md @@ -10,6 +10,8 @@ category: - Build with Copilot CLI - Copilot in the CLI - Author and optimize with Copilot +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/cli-getting-started.md b/content/copilot/how-tos/copilot-cli/cli-getting-started.md index 8e464b5de448..8b3cc2c34206 100644 --- a/content/copilot/how-tos/copilot-cli/cli-getting-started.md +++ b/content/copilot/how-tos/copilot-cli/cli-getting-started.md @@ -11,6 +11,8 @@ category: - Build with Copilot CLI - Quickstarts - Author and optimize with Copilot +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/connecting-vs-code.md b/content/copilot/how-tos/copilot-cli/connecting-vs-code.md index 3d22e7645923..9073ef280ac9 100644 --- a/content/copilot/how-tos/copilot-cli/connecting-vs-code.md +++ b/content/copilot/how-tos/copilot-cli/connecting-vs-code.md @@ -9,6 +9,8 @@ contentType: how-tos category: - Author and optimize with Copilot # Copilot discovery page - Build with Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- Connecting {% data variables.copilot.copilot_cli_short %} to {% data variables.product.prodname_vscode_shortname %} gives you the best of both environments: the speed and flexibility of a terminal-based workflow, combined with the rich visual tools of your editor. With a connection established, you can: diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.md b/content/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.md index 5bb5660a97c6..d5a512eb210b 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions.md @@ -11,6 +11,8 @@ redirect_from: - /copilot/how-tos/copilot-cli/add-repository-instructions - /copilot/how-tos/copilot-cli/add-custom-instructions contentType: how-tos +docsTeamMetrics: + - copilot-cli --- {% 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. diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md b/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md index ecb286907d67..a510eaf30769 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md @@ -9,6 +9,8 @@ contentType: how-tos category: - Configure Copilot CLI # Copilot CLI bespoke page - Author and optimize with Copilot # Copilot discovery page +docsTeamMetrics: + - copilot-cli --- The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). You can connect MCP servers to {% data variables.copilot.copilot_cli %} to give {% data variables.product.prodname_copilot_short %} access to external tools, data sources, and services. For an overview of MCP, see [AUTOTITLE](/copilot/concepts/about-mcp). diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md b/content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md index e449adefd7fe..bf4b4069fd0a 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli.md @@ -10,6 +10,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page contentType: how-tos +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/create-skills.md b/content/copilot/how-tos/copilot-cli/customize-copilot/create-skills.md index 4c6f3fb909e9..cd7f5d17a897 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/create-skills.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/create-skills.md @@ -10,6 +10,8 @@ category: - Configure Copilot # Copilot discovery page - Author and optimize with Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- Agent skills are folders of instructions, scripts, and resources that {% data variables.product.prodname_copilot_short %} can load when relevant to improve its performance in specialized tasks. For more information, see [AUTOTITLE](/copilot/concepts/agents/about-agent-skills). diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/index.md b/content/copilot/how-tos/copilot-cli/customize-copilot/index.md index d90f5340ff14..ae4869df3634 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/index.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/index.md @@ -16,4 +16,6 @@ children: - /plugins-finding-installing - /plugins-creating - /plugins-marketplace +docsTeamMetrics: + - copilot-cli --- diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/overview.md b/content/copilot/how-tos/copilot-cli/customize-copilot/overview.md index 775815824c7b..8695c8fa99d9 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/overview.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/overview.md @@ -11,6 +11,8 @@ category: - Configure Copilot CLI # Copilot CLI bespoke page redirect_from: - /copilot/how-tos/copilot-cli/customize-copilot/quickstart-for-customizing +docsTeamMetrics: + - copilot-cli --- You can download and install {% data variables.copilot.copilot_cli_short %}, and start using it straight away, without any additional configuration. However, you'll find that you can improve {% data variables.product.prodname_copilot_short %}'s responses if you spend a little time providing it with guidelines and context, and giving it access to tools that are relevant to your project. This article introduces the various ways in which you can customize {% data variables.copilot.copilot_cli_short %}. diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating.md b/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating.md index f7e3bf3645ee..591cc0eea963 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating.md @@ -10,6 +10,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page contentType: how-tos +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing.md b/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing.md index b2acfba4272f..e731fe79efbf 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing.md @@ -10,6 +10,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page contentType: how-tos +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-marketplace.md b/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-marketplace.md index 9158e63e12a3..6554633d3711 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-marketplace.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/plugins-marketplace.md @@ -10,6 +10,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page contentType: how-tos +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md index 5b780ea3071c..c2456adce496 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md @@ -9,6 +9,8 @@ contentType: how-tos category: - Configure Copilot - Configure Copilot CLI +docsTeamMetrics: + - copilot-cli --- You can configure {% data variables.copilot.copilot_cli_short %} to use your own LLM provider, also called BYOK (Bring Your Own Key), instead of {% data variables.product.github %}-hosted models. This lets you connect to OpenAI-compatible endpoints, Azure OpenAI, or Anthropic, including locally running models such as Ollama. diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md b/content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md index 438f85f1d876..6807feb08dfa 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/use-hooks.md @@ -5,11 +5,13 @@ intro: "Extend {% data variables.product.prodname_copilot %} agent behavior with versions: feature: copilot contentType: how-tos -category: +category: - Author and optimize with Copilot # Copilot discovery page - Build with Copilot CLI # Copilot CLI bespoke page redirect_from: - /copilot/how-tos/copilot-cli/use-hooks +docsTeamMetrics: + - copilot-cli --- {% data reusables.copilot.cloud-agent.hooks-intro %} diff --git a/content/copilot/how-tos/copilot-cli/index.md b/content/copilot/how-tos/copilot-cli/index.md index 5a3272c716f7..8ec27a764e2e 100644 --- a/content/copilot/how-tos/copilot-cli/index.md +++ b/content/copilot/how-tos/copilot-cli/index.md @@ -64,4 +64,6 @@ includedCategories: - Configure Copilot CLI - Build with Copilot CLI - Administer Copilot CLI +docsTeamMetrics: + - copilot-cli --- diff --git a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli.md b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli.md index 892d136e0ae4..f2feaff18465 100644 --- a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli.md +++ b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli.md @@ -8,6 +8,8 @@ versions: contentType: how-tos category: - Configure Copilot CLI +docsTeamMetrics: + - copilot-cli --- ## About authentication diff --git a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md index 73f2e45c009c..d748fcb8fd49 100644 --- a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md +++ b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md @@ -8,6 +8,8 @@ contentType: how-tos category: - Configure Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- ## Introduction diff --git a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/index.md b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/index.md index 29179bd7b888..4298bbb5d0b9 100644 --- a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/index.md +++ b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/index.md @@ -9,6 +9,7 @@ children: - /authenticate-copilot-cli - /configure-copilot-cli - /troubleshoot-copilot-cli-auth - contentType: how-tos +docsTeamMetrics: + - copilot-cli --- diff --git a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli.md b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli.md index c4b7f31e7779..551552b72688 100644 --- a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli.md +++ b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli.md @@ -19,6 +19,8 @@ contentType: how-tos category: - Configure Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- To find out about {% data variables.copilot.copilot_cli_short %} before you install it, see [AUTOTITLE](/copilot/concepts/agents/about-copilot-cli). diff --git a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/troubleshoot-copilot-cli-auth.md b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/troubleshoot-copilot-cli-auth.md index a3f4d865cf93..5f208480fcf8 100644 --- a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/troubleshoot-copilot-cli-auth.md +++ b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/troubleshoot-copilot-cli-auth.md @@ -7,6 +7,8 @@ versions: contentType: how-tos category: - Configure Copilot CLI +docsTeamMetrics: + - copilot-cli --- ## Authentication errors diff --git a/content/copilot/how-tos/copilot-cli/speeding-up-task-completion.md b/content/copilot/how-tos/copilot-cli/speeding-up-task-completion.md index 19a108275a9e..3364d7014b96 100644 --- a/content/copilot/how-tos/copilot-cli/speeding-up-task-completion.md +++ b/content/copilot/how-tos/copilot-cli/speeding-up-task-completion.md @@ -8,6 +8,8 @@ contentType: how-tos category: - Author and optimize with Copilot # Copilot discovery page - Build with Copilot CLI # Copilot CLI bespoke page +docsTeamMetrics: + - copilot-cli --- Where a task involves multiple operations, some or all of which can be worked on in parallel, the `/fleet` slash command can speed up task completion. When you use this command, {% data variables.product.prodname_copilot_short %} assigns separate parts of the work to subagents. diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/agentic-code-review.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/agentic-code-review.md index d1aa6ea07b15..67456cf5d983 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/agentic-code-review.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/agentic-code-review.md @@ -8,7 +8,9 @@ versions: feature: copilot contentType: how-tos category: - - Build with Copilot CLI + - Build with Copilot CLI +docsTeamMetrics: + - copilot-cli --- ## About agentic code review diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/delegate-tasks-to-cca.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/delegate-tasks-to-cca.md index 462e58f231b5..99b640c3ac79 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/delegate-tasks-to-cca.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/delegate-tasks-to-cca.md @@ -9,6 +9,8 @@ versions: contentType: how-tos category: - Build with Copilot CLI +docsTeamMetrics: + - copilot-cli --- ## Get {% data variables.product.prodname_copilot_short %} to work autonomously diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/index.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/index.md index d118337ada3a..0fc6978da73a 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/index.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/index.md @@ -11,5 +11,7 @@ children: - /steer-agents - /agentic-code-review contentType: how-tos +docsTeamMetrics: + - copilot-cli --- diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/invoke-custom-agents.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/invoke-custom-agents.md index f326087c6242..c9b517744911 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/invoke-custom-agents.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/invoke-custom-agents.md @@ -8,6 +8,8 @@ versions: contentType: how-tos category: - Build with Copilot CLI +docsTeamMetrics: + - copilot-cli --- ## Use {% data variables.copilot.custom_agents_short %} diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/overview.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/overview.md index 42c753424a93..2ea76ca4de4d 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/overview.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/overview.md @@ -13,6 +13,8 @@ contentType: how-tos category: - Author and optimize with Copilot - Build with Copilot CLI +docsTeamMetrics: + - copilot-cli --- The command-line interface (CLI) for {% data variables.product.prodname_copilot %} allows you to use {% data variables.product.prodname_copilot_short %} directly from your terminal. For more information, see [AUTOTITLE](/copilot/concepts/agents/about-copilot-cli). diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/steer-agents.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/steer-agents.md index e82725acd218..f961acaa2b8f 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/steer-agents.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/steer-agents.md @@ -7,7 +7,9 @@ versions: feature: copilot contentType: how-tos category: - - Build with Copilot CLI + - Build with Copilot CLI +docsTeamMetrics: + - copilot-cli --- ## Steer the conversation while {% data variables.product.prodname_copilot_short %} is thinking diff --git a/content/copilot/reference/copilot-cli-reference/acp-server.md b/content/copilot/reference/copilot-cli-reference/acp-server.md index 1b99dc09125b..3d2cefedc433 100644 --- a/content/copilot/reference/copilot-cli-reference/acp-server.md +++ b/content/copilot/reference/copilot-cli-reference/acp-server.md @@ -10,6 +10,8 @@ category: contentType: reference redirect_from: - /copilot/reference/acp-server +docsTeamMetrics: + - copilot-cli --- > [!NOTE] diff --git a/content/copilot/reference/copilot-cli-reference/cli-command-reference.md b/content/copilot/reference/copilot-cli-reference/cli-command-reference.md index 76039d457be4..afdf1b72f231 100644 --- a/content/copilot/reference/copilot-cli-reference/cli-command-reference.md +++ b/content/copilot/reference/copilot-cli-reference/cli-command-reference.md @@ -10,6 +10,8 @@ category: contentType: reference redirect_from: - /copilot/reference/cli-command-reference +docsTeamMetrics: + - copilot-cli --- ## Command-line commands diff --git a/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md b/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md index de014db5afe8..e69adc92a007 100644 --- a/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md +++ b/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md @@ -9,6 +9,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page contentType: reference +docsTeamMetrics: + - copilot-cli --- {% data variables.copilot.copilot_cli_short %} stores its configuration, session history, logs, and customizations in a single directory on your machine. By default, this directory is `~/.copilot` (that is, `$HOME/.copilot`). diff --git a/content/copilot/reference/copilot-cli-reference/cli-plugin-reference.md b/content/copilot/reference/copilot-cli-reference/cli-plugin-reference.md index bf02befbda74..69238166dfae 100644 --- a/content/copilot/reference/copilot-cli-reference/cli-plugin-reference.md +++ b/content/copilot/reference/copilot-cli-reference/cli-plugin-reference.md @@ -10,6 +10,8 @@ category: contentType: reference redirect_from: - /copilot/reference/cli-plugin-reference +docsTeamMetrics: + - copilot-cli --- {% data reusables.copilot.copilot-cli.cli-help-note %} diff --git a/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md b/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md index 4c34a92d58c4..90d2f5b6b8c1 100644 --- a/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md +++ b/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md @@ -8,6 +8,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Configure Copilot CLI # Copilot CLI bespoke page contentType: reference +docsTeamMetrics: + - copilot-cli --- In addition to running {% data variables.copilot.copilot_cli_short %} interactively, you can also pass a prompt directly to the CLI in a single command, without entering an interactive session. This allows you to use {% data variables.product.prodname_copilot_short %} programmatically in scripts, CI/CD pipelines, and automation workflows. For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically). diff --git a/content/copilot/reference/copilot-cli-reference/index.md b/content/copilot/reference/copilot-cli-reference/index.md index 2af94a3ebc46..a763d0c872ff 100644 --- a/content/copilot/reference/copilot-cli-reference/index.md +++ b/content/copilot/reference/copilot-cli-reference/index.md @@ -11,4 +11,6 @@ children: - /acp-server - /cli-config-dir-reference contentType: reference +docsTeamMetrics: + - copilot-cli --- diff --git a/content/copilot/responsible-use/copilot-cli.md b/content/copilot/responsible-use/copilot-cli.md index b9fc5deff7c7..eeba31213819 100644 --- a/content/copilot/responsible-use/copilot-cli.md +++ b/content/copilot/responsible-use/copilot-cli.md @@ -14,6 +14,8 @@ contentType: rai category: - Responsible use - Learn about Copilot CLI +docsTeamMetrics: + - copilot-cli --- ## About {% data variables.copilot.copilot_cli %} diff --git a/content/copilot/tutorials/copilot-cli-hooks.md b/content/copilot/tutorials/copilot-cli-hooks.md index 02544ec18381..27d24abdbb56 100644 --- a/content/copilot/tutorials/copilot-cli-hooks.md +++ b/content/copilot/tutorials/copilot-cli-hooks.md @@ -10,6 +10,8 @@ category: - Author and optimize with Copilot # Copilot discovery page - Administer Copilot CLI # Copilot CLI bespoke page allowTitleToDifferFromFilename: true +docsTeamMetrics: + - copilot-cli --- This tutorial is for DevOps engineers, platform teams, and engineering leaders who support developers using {% data variables.copilot.copilot_cli_short %}. diff --git a/data/reusables/contributing/content-linter-rules.md b/data/reusables/contributing/content-linter-rules.md index ee8f85863d6f..833bb25a8bd8 100644 --- a/data/reusables/contributing/content-linter-rules.md +++ b/data/reusables/contributing/content-linter-rules.md @@ -67,6 +67,7 @@ | GHD063 | frontmatter-children | Children frontmatter paths must exist. Supports relative paths and absolute /content/ paths for cross-product inclusion. | error | frontmatter, children | | GHD064 | rai-app-card-structure | RAI application/platform card articles must follow the required template structure | warning | feature, rai | | GHD065 | frontmatter-content-type | Content files in content-type directories must have a contentType frontmatter property that matches the parent directory. | error | frontmatter, content-type | +| GHD066 | frontmatter-docs-team-metrics | Articles whose path contains a docsTeamMetrics value must include that value in their docsTeamMetrics frontmatter property. | error | frontmatter, docs-team-metrics | | [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | deprecated liquid syntax: octicon- | The octicon liquid syntax used is deprecated. Use this format instead `octicon "" aria-label=""` | error | | | [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | deprecated liquid syntax: site.data | Catch occurrences of deprecated liquid data syntax. | error | | | [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | developer-domain | Catch occurrences of developer.github.com domain. | error | | diff --git a/src/content-linter/lib/linting-rules/frontmatter-docs-team-metrics.ts b/src/content-linter/lib/linting-rules/frontmatter-docs-team-metrics.ts new file mode 100644 index 000000000000..f7381c36eeda --- /dev/null +++ b/src/content-linter/lib/linting-rules/frontmatter-docs-team-metrics.ts @@ -0,0 +1,42 @@ +import { addError } from 'markdownlint-rule-helpers' +import type { RuleParams, RuleErrorCallback } from '@/content-linter/types' + +import { getFrontmatter } from '../helpers/utils' +import { docsTeamMetricsEnum } from '@/frame/lib/frontmatter' + +// Paths (directory or filename substrings) excluded from this rule. +const EXCLUDED_PATHS: string[] = [] + +export const frontmatterDocsTeamMetrics = { + names: ['GHD066', 'frontmatter-docs-team-metrics'], + description: + 'Articles whose path contains a docsTeamMetrics value must include that value in their docsTeamMetrics frontmatter property.', + tags: ['frontmatter', 'docs-team-metrics'], + function: (params: RuleParams, onError: RuleErrorCallback) => { + const fm = getFrontmatter(params.lines) + if (!fm) return + + const filePath = params.name + + if (EXCLUDED_PATHS.some((exc) => filePath.includes(exc))) return + + // Determine which docsTeamMetrics values match this file's path. + const expectedValues = docsTeamMetricsEnum.filter((value) => filePath.includes(value)) + if (expectedValues.length === 0) return + + const currentValues: string[] = Array.isArray(fm.docsTeamMetrics) ? fm.docsTeamMetrics : [] + + const missingValues = expectedValues.filter((v) => !currentValues.includes(v)) + if (missingValues.length === 0) return + + // Report on the first line of frontmatter (the opening ---) + addError( + onError, + 1, + `Missing docsTeamMetrics: [${missingValues.join(', ')}]. Add it to frontmatter, or add the file path to EXCLUDED_PATHS in src/content-linter/lib/linting-rules/frontmatter-docs-team-metrics.ts.`, + undefined, + undefined, + null, + ) + }, +} diff --git a/src/content-linter/lib/linting-rules/index.ts b/src/content-linter/lib/linting-rules/index.ts index d2d94ce7ede6..56b641849e14 100644 --- a/src/content-linter/lib/linting-rules/index.ts +++ b/src/content-linter/lib/linting-rules/index.ts @@ -56,6 +56,7 @@ import { frontmatterChildren } from './frontmatter-children' import { frontmatterCurlyQuotes } from './frontmatter-curly-quotes' import { raiAppCardStructure } from '@/content-linter/lib/linting-rules/rai-app-card-structure' import { frontmatterContentType } from '@/content-linter/lib/linting-rules/frontmatter-content-type' +import { frontmatterDocsTeamMetrics } from '@/content-linter/lib/linting-rules/frontmatter-docs-team-metrics' // Using any type because @github/markdownlint-github doesn't provide TypeScript declarations // The elements in the array have a 'names' property that contains rule identifiers @@ -123,6 +124,7 @@ export const gitHubDocsMarkdownlint = { frontmatterChildren, // GHD063 raiAppCardStructure, // GHD064 frontmatterContentType, // GHD065 + frontmatterDocsTeamMetrics, // GHD066 // Search-replace rules searchReplace, // Open-source plugin diff --git a/src/content-linter/style/github-docs.ts b/src/content-linter/style/github-docs.ts index a874ee6ff585..27f39754a4ba 100644 --- a/src/content-linter/style/github-docs.ts +++ b/src/content-linter/style/github-docs.ts @@ -303,6 +303,12 @@ export const githubDocsFrontmatterConfig = { 'partial-markdown-files': false, 'yml-files': false, }, + 'frontmatter-docs-team-metrics': { + // GHD066 + severity: 'error', + 'partial-markdown-files': false, + 'yml-files': false, + }, } // Configures rules from the `github/markdownlint-github` repo diff --git a/src/content-linter/tests/unit/frontmatter-docs-team-metrics.ts b/src/content-linter/tests/unit/frontmatter-docs-team-metrics.ts new file mode 100644 index 000000000000..68d2b61cfb9d --- /dev/null +++ b/src/content-linter/tests/unit/frontmatter-docs-team-metrics.ts @@ -0,0 +1,40 @@ +import { describe, expect, test } from 'vitest' + +import { runRule } from '../../lib/init-test' +import { frontmatterDocsTeamMetrics } from '../../lib/linting-rules/frontmatter-docs-team-metrics' + +const fmOptions = { markdownlintOptions: { frontMatter: null } } + +const MISSING = { + 'content/copilot/how-tos/copilot-cli/article.md': + '---\ntitle: Test\nversions:\n feature: copilot\n---\n', +} +const HAS = { + 'content/copilot/how-tos/copilot-cli/article.md': + '---\ntitle: Test\nversions:\n feature: copilot\ndocsTeamMetrics:\n - copilot-cli\n---\n', +} +const NO_MATCH = { + 'content/copilot/how-tos/other/article.md': + '---\ntitle: Test\nversions:\n feature: copilot\n---\n', +} + +describe(frontmatterDocsTeamMetrics.names.join(' - '), () => { + test('file in copilot-cli path without docsTeamMetrics fails', async () => { + const result = await runRule(frontmatterDocsTeamMetrics, { strings: MISSING, ...fmOptions }) + const errors = result[Object.keys(MISSING)[0]] + expect(errors.length).toBe(1) + expect(errors[0].ruleNames).toContain('GHD066') + }) + + test('file in copilot-cli path with correct docsTeamMetrics passes', async () => { + const result = await runRule(frontmatterDocsTeamMetrics, { strings: HAS, ...fmOptions }) + const errors = result[Object.keys(HAS)[0]] + expect(errors.length).toBe(0) + }) + + test('file not in a matching path is skipped', async () => { + const result = await runRule(frontmatterDocsTeamMetrics, { strings: NO_MATCH, ...fmOptions }) + const errors = result[Object.keys(NO_MATCH)[0]] + expect(errors.length).toBe(0) + }) +}) From 3c5b32e854762876a026f12fdf71e5b3d14d723b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:02:13 -0700 Subject: [PATCH 2/2] Document `update-types` support in `allow` block for dependabot.yml (#60517) Co-authored-by: kbukum1 Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com> --- .../controlling-dependencies-updated.md | 57 ++++++++++++++++++- .../dependabot-options-reference.md | 25 +++++++- .../dependabot-allow-update-types.yml | 7 +++ 3 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 data/features/dependabot-allow-update-types.yml diff --git a/content/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/controlling-dependencies-updated.md b/content/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/controlling-dependencies-updated.md index feffa748d215..4bb016f257eb 100644 --- a/content/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/controlling-dependencies-updated.md +++ b/content/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/controlling-dependencies-updated.md @@ -133,7 +133,7 @@ For more information, see `allow` in [AUTOTITLE](/code-security/dependabot/worki By default, {% data variables.product.prodname_dependabot %} creates version update pull requests only for the dependencies that are explicitly defined in a manifest (`direct` dependencies). This configuration uses `allow` to tell {% data variables.product.prodname_dependabot %} that we want it to maintain `all` types of dependency. That is, both the `direct` dependencies and their dependencies (also known as indirect dependencies, sub-dependencies, or transient dependencies). In addition, the configuration tells {% data variables.product.prodname_dependabot %} to ignore all dependencies with a name matching the pattern `org.xwiki.*` because we have a different process for maintaining them. > [!TIP] -> {% data variables.product.prodname_dependabot %} checks for all **allowed** dependencies, then filters out any **ignored** dependencies. If a dependency is matched by an **allow** and an **ignore** statement, then it is ignored. +> {% data variables.product.prodname_dependabot %} checks for all **allowed** dependencies, then filters out any **ignored** dependencies. If a dependency is matched by an **allow** and an **ignore** statement, then it is ignored.{% ifversion dependabot-allow-update-types %} You can also use `update-types` in `allow` rules to restrict updates to specific semantic versioning levels.{% endif %} ```yaml copy version: 2 @@ -167,6 +167,58 @@ updates: open-pull-requests-limit: 15 ``` +{% ifversion dependabot-allow-update-types %} + +## Allowing specific semantic versioning levels for updates + +You can use `update-types` with `allow` to restrict updates to specific semantic versioning (SemVer) levels. This is useful when you want to be explicit about which types of updates Dependabot should create pull requests for. + +> [!NOTE] +> `update-types` only affects _version_ updates, not _security_ updates. Security updates will always be created regardless of the `update-types` setting. + +For more information, see `update-types` in [AUTOTITLE](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#update-types-allow). + +Here are some examples showing how `update-types` can be used with `allow`. + +* To allow only minor and patch updates for a specific dependency, you can combine `update-types` with `dependency-name`. + + ```yaml copy + version: 2 + updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + allow: + - dependency-name: "io.micrometer:micrometer-core" + update-types: + - "version-update:semver-minor" + - "version-update:semver-patch" + ``` + +* To apply different update policies for production and development dependencies, you can combine `update-types` with `dependency-type`. + + ```yaml copy + version: 2 + updates: + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "monthly" + allow: + - dependency-type: "production" + update-types: + - "version-update:semver-patch" + - dependency-type: "development" + update-types: + - "version-update:semver-minor" + - "version-update:semver-patch + ``` + + In this example, production dependencies will only receive patch updates, while development dependencies will receive both minor and patch updates. + +{% endif %} + ## Ignoring specific versions or ranges of versions You can use `versions` in conjunction with `ignore` to ignore specific versions or ranges of versions. @@ -201,7 +253,8 @@ For more information, see `versions` in [AUTOTITLE](/code-security/dependabot/wo ## Specifying the semantic versioning level to ignore -You can specify one or more semantic versioning (SemVer) levels to ignore using `update-types`. + +You can specify one or more semantic versioning (SemVer) levels to ignore using `update-types` with `ignore`.{% ifversion dependabot-allow-update-types %} Alternatively, you can use `update-types` with `allow` to explicitly specify which update levels to allow, see [Allowing specific semantic versioning levels for updates](#allowing-specific-semantic-versioning-levels-for-updates).{% endif %} For more information, see `update-types` in [AUTOTITLE](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#update-types-ignore). diff --git a/content/code-security/reference/supply-chain-security/dependabot-options-reference.md b/content/code-security/reference/supply-chain-security/dependabot-options-reference.md index 70b3be9751ad..aba16f7acd76 100644 --- a/content/code-security/reference/supply-chain-security/dependabot-options-reference.md +++ b/content/code-security/reference/supply-chain-security/dependabot-options-reference.md @@ -81,6 +81,9 @@ When `allow` is specified {% data variables.product.prodname_dependabot %} uses |------------|---------| | `dependency-name` | Allow updates for dependencies with matching names, optionally using `*` to match zero or more characters. | | `dependency-type` | Allow updates for dependencies of specific types. | +| {% ifversion dependabot-allow-update-types %} | +| `update-types` | Allow updates to one or more semantic versioning levels. Supported values: `version-update:semver-patch`, `version-update:semver-minor`, and `version-update:semver-major`. | +| {% endif %} | ### `dependency-name` (`allow`) @@ -101,6 +104,26 @@ For most package managers, you should define a value that will match the depende | `production` | `bundler`, `composer`, `mix`, `maven`, `npm`, `pip`{% ifversion dependabot-uv-support %}, `uv`{% endif %} (not all managers) | Only to dependencies defined by the package manager as production dependencies. | | `development`| `bundler`, `composer`, `mix`, `maven`, `npm`, `pip`{% ifversion dependabot-uv-support %}, `uv`{% endif %} (not all managers) | Only to dependencies defined by the package manager as development dependencies. | +{% ifversion dependabot-allow-update-types %} + +### `update-types` (`allow`) + +`update-types` only affects _version_ updates, not _security updates_. + +Specify which semantic versions (SemVer) to allow. + +SemVer is an accepted standard for defining versions of software packages, in the form `x.y.z`. {% data variables.product.prodname_dependabot %} assumes that versions in this form are always `major.minor.patch`. The `update-types` value is a list of one or more strings. + +* Use `version-update:semver-patch` to allow patch releases. +* Use `version-update:semver-minor` to allow minor releases. +* Use `version-update:semver-major` to allow major releases. + +When `update-types` is omitted from an `allow` rule, all update types are allowed for that rule. + +You can combine `update-types` with `dependency-name` or `dependency-type` to further narrow allowed updates. For examples of how you can combine these options, see [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/controlling-dependencies-updated#allowing-specific-semantic-versioning-levels-for-updates). + +{% endif %} + ## `assignees` {% octicon "versions" aria-label="Version updates" height="24" %} {% octicon "shield-check" aria-label="Security updates" height="24" %} Specify individual assignees for all pull requests raised for a package ecosystem. For examples, see [AUTOTITLE](/code-security/dependabot/dependabot-version-updates/customizing-dependabot-prs). @@ -351,7 +374,7 @@ When `ignore` is used {% data variables.product.prodname_dependabot %} uses the |------------|---------| | `dependency-name` | Ignore updates for dependencies with matching names, optionally using `*` to match zero or more characters. | | `versions` | Ignore specific versions or ranges of versions. | -| `update-types` | Ignore updates to one or more semantic versioning levels. Supported values: `version-update:semver-minor`, `version-update:semver-patch`, and `version-update:semver-major`. | +| `update-types` | Ignore updates to one or more semantic versioning levels. Supported values: `version-update:semver-patch`, `version-update:semver-minor`, and `version-update:semver-major`. | ### `dependency-name` (`ignore`) diff --git a/data/features/dependabot-allow-update-types.yml b/data/features/dependabot-allow-update-types.yml new file mode 100644 index 000000000000..945a942672ad --- /dev/null +++ b/data/features/dependabot-allow-update-types.yml @@ -0,0 +1,7 @@ +# References: +# Issue docs-content#21952 - Document update-types support in allow block +# Core: https://github.com/dependabot/dependabot-core/pull/12925 +versions: + fpt: '*' + ghec: '*' + ghes: '>3.21'