You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
22
22
@@ -205,18 +205,19 @@ The following table summarizes the settings that you can enable or configure for
205
205
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.
206
206
:::row-end:::
207
207
::: 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"
218
209
:::row:::
219
210
:::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
220
221
**Policy** or **Option**
221
222
:::column-end:::
222
223
:::column span="1":::
@@ -860,6 +861,26 @@ Enabling this setting disables access to the repository, including builds and pu
860
861
:::image type="content" source="media/repository-settings/disable-repository.png" alt-text="Screenshot that shows the Disable Repository setting.":::
861
862
::: moniker-end
862
863
864
+
::: moniker range="azure-devops"
865
+
866
+
<aid="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
+
863
884
::: moniker range="<=azure-devops"
864
885
865
886
## Searchable branches setting
@@ -1195,6 +1216,26 @@ ID Name Is Blocking Is Enabled Repository Id
1195
1216
1196
1217
***
1197
1218
1219
+
<aid="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
+
1198
1239
## Related content
1199
1240
1200
1241
-[Improve code quality with branch policies](branch-policies.md)
0 commit comments