Skip to content

Commit e0a3c3e

Browse files
committed
AI authored draft
1 parent 5d23752 commit e0a3c3e

1 file changed

Lines changed: 54 additions & 13 deletions

File tree

docs/repos/git/repository-settings.md

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ description: Learn how to configure a Git repository and its branches.
55
ms.assetid: 9336ed18-c239-4394-aa4c-64b6d01130f9
66
ms.service: azure-devops-repos
77
ms.topic: how-to
8-
ms.custom: cross-service, devx-track-azurecli
8+
ms.custom: cross-service, devx-track-azurecli, copilot-scenario-highlight
99
ai-usage: ai-assisted
1010
monikerRange: '<= azure-devops'
11-
ms.date: 08/08/2022
11+
ms.date: 03/26/2026
1212
ms.subservice: azure-devops-repos-git
1313
---
1414

1515
# Set Git repository settings and policies
1616

1717
[!INCLUDE [version-lt-eq-azure-devops](../../includes/version-lt-eq-azure-devops.md)]
1818

19-
[!INCLUDE [ai-assistance-callout](../../includes/ai-assistance-callout.md)]
19+
[!INCLUDE [ai-assistance-mcp-server-tip](../../includes/ai-assistance-mcp-server-tip.md)]
2020

2121
There are several ways to customize your Azure Repos Git repositories by using branch and repository settings and policies. This article discusses repository-level settings and policies.
2222

@@ -205,18 +205,19 @@ The following table summarizes the settings that you can enable or configure for
205205
Specify up to five more branches to participate in code search, which by default applies only to the default branch. Requires the [Code Search extension](https://marketplace.visualstudio.com/items?itemName=ms.vss-code-search) installed and enabled.
206206
:::row-end:::
207207
::: moniker-end
208-
209-
::: moniker range="<=azure-devops"
210-
211-
### Repository policies or options
212-
213-
The following table summarizes the policies or options that you can set for either all or individual repositories. Policies set for **All Repositories** set the default for individual repositories added at a later date.
214-
215-
::: moniker-end
216-
217-
::: moniker range="<=azure-devops"
208+
::: moniker range="azure-devops"
218209
:::row:::
219210
:::column span="2":::
211+
[Include PR ID in commit message](#include-pr-id-in-commit-message)
212+
:::column-end:::
213+
:::column span="1":::
214+
On
215+
:::column-end:::
216+
:::column span="3":::
217+
Include the pull request ID in the commit message title for commits generated during PR completion. When disabled, PR completion commit messages don't include the PR ID prefix.
218+
:::column-end:::
219+
:::row-end:::
220+
::: moniker-end
220221
**Policy** or **Option**
221222
:::column-end:::
222223
:::column span="1":::
@@ -860,6 +861,26 @@ Enabling this setting disables access to the repository, including builds and pu
860861
:::image type="content" source="media/repository-settings/disable-repository.png" alt-text="Screenshot that shows the Disable Repository setting.":::
861862
::: moniker-end
862863

864+
::: moniker range="azure-devops"
865+
866+
<a id="include-pr-id-in-commit-message"></a>
867+
868+
## Include PR ID in commit message setting
869+
870+
This repository setting controls whether the pull request (PR) ID is automatically included in the commit message title for commits generated during PR completion actions such as merge, squash, or rebase.
871+
872+
By default, this setting is enabled to preserve existing behavior. When enabled, commit messages generated during PR completion include the PR ID as a prefix in the commit message title. When disabled, the PR ID prefix is omitted from PR completion commit messages.
873+
874+
> [!NOTE]
875+
> This setting applies only to commits generated during PR completion. It doesn't affect manual commits. The setting only applies to commits created after you change the setting.
876+
877+
To enable or disable the PR ID in commit messages:
878+
879+
1. Select **Project Settings** > **Repositories**, and then select a repository.
880+
1. On the **\<Repository name>** page, on the **Settings** tab, set **Include PR ID in the completion commit message title by default** to **On** or **Off**.
881+
882+
::: moniker-end
883+
863884
::: moniker range="<=azure-devops"
864885

865886
## Searchable branches setting
@@ -1195,6 +1216,26 @@ ID Name Is Blocking Is Enabled Repository Id
11951216

11961217
***
11971218

1219+
<a id="use-ai-assistance"></a>
1220+
1221+
## Use AI to manage Git repository settings
1222+
1223+
If you have the [Azure DevOps MCP Server](../../mcp-server/mcp-server-overview.md) configured, you can query and manage repository settings and policies using natural language prompts with your AI assistant.
1224+
1225+
| Task | Example prompt |
1226+
|------|----------------|
1227+
| List repositories | `List all Git repositories in the <project-name> project` |
1228+
| View repository details | `Show me the settings for the <repository-name> repository in <project-name>` |
1229+
| Check repository policies | `What policies are configured for the <repository-name> repository?` |
1230+
| List branch policies | `Show all branch policies on the main branch in the <repository-name> repository` |
1231+
| Check PR completion settings | `What merge types are allowed for pull requests in the <repository-name> repository?` |
1232+
| Review cross-repo policies | `List all cross-repository branch policies in the <project-name> project` |
1233+
| Check code search branches | `Which branches are configured for code search in the <repository-name> repository?` |
1234+
| Audit repository permissions | `Who has contribute permissions on the <repository-name> repository in <project-name>?` |
1235+
1236+
> [!TIP]
1237+
> If you're using Visual Studio Code, [agent mode](/visualstudio/ide/copilot-chat-context#agent-mode) is especially helpful for reviewing and managing repository settings and policies across multiple repositories.
1238+
11981239
## Related content
11991240

12001241
- [Improve code quality with branch policies](branch-policies.md)

0 commit comments

Comments
 (0)