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
Copy file name to clipboardExpand all lines: articles/github-copilot-app-modernization/modernization-agent/batch-upgrade.md
+84-35Lines changed: 84 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: karler
6
6
ms.reviewer: jessiehuang
7
7
ms.topic: how-to
8
8
ai-usage: ai-assisted
9
-
ms.date: 03/11/2026
9
+
ms.date: 04/17/2026
10
10
---
11
11
12
12
# Batch upgrade with the GitHub Copilot modernization agent
@@ -46,11 +46,21 @@ Batch upgrade provides the following benefits:
46
46
47
47
## Configure repositories
48
48
49
-
To enable batch upgrade, create a `.github/modernize/repos.json` file in your working directory that lists all repositories you want to upgrade.
49
+
The modernization agent supports multiple ways to specify the repositories you want to upgrade:
50
+
51
+
-**Current folder**: Upgrade the project in your current working directory.
52
+
-**Manual input**: Enter local directory paths or remote Git URLs directly.
53
+
-**Repository config file**: Use a JSON config file that lists all repositories.
54
+
55
+
### Repository config file
56
+
57
+
For batch operations across many repositories, create a JSON config file to list all repositories. For example, create it at `.github/modernize/repos.json` in your working directory, or provide a custom path.
50
58
51
59
> [!TIP]
52
60
> For sample repositories, fork them first and make sure you have admin permission to delegate the job to Cloud Coding Agents.
53
61
62
+
**Simple format** (array of repositories):
63
+
54
64
```json
55
65
[
56
66
{
@@ -64,21 +74,38 @@ To enable batch upgrade, create a `.github/modernize/repos.json` file in your wo
|`name`| A friendly name for the repository (used in reports and dashboards). | Yes |
100
+
|`url`| Git clone URL in HTTPS or SSH format. | One of `url` or `path`|
101
+
|`path`| Absolute local directory path. | One of `url` or `path`|
102
+
|`branch`| Branch to check out after cloning. | No |
103
+
|`description`| Human-readable description. | No |
73
104
74
105
> [!TIP]
75
106
> You can include repositories from different organizations and use different authentication methods as long as you have access.
76
107
77
-
### File location
78
-
79
-
You must place the `repos.json` file at `.github/modernize/repos.json`.
80
-
81
-
The modernization agent automatically detects this file when running batch operations.
108
+
The modernization agent automatically detects the `repos.json` file at `.github/modernize/repos.json` when you select **From a config file** in interactive mode. You can also provide a custom path.
82
109
83
110
## Choose your execution mode
84
111
@@ -91,12 +118,17 @@ Batch upgrade supports two execution modes and two interaction methods:
91
118
-**Best for**: Testing, smaller sets of repositories (1-5 repos), or when you prefer local control.
92
119
-**How it works**: Processes repositories sequentially on your local machine.
93
120
-**Setup required**: None beyond the basic prerequisites.
121
+
-**Supports**: Both Git URL and local path repositories.
94
122
95
123
**Cloud Coding Agent delegation**
96
124
97
125
-**Best for**: Enterprise-scale operations, large portfolios (5+ repos), or parallel processing.
98
126
-**How it works**: Submits tasks to GitHub Cloud Coding Agents for parallel execution in the cloud.
99
127
-**Setup required**: MCP server configuration in each repository (configured during setup).
128
+
-**Supports**: Only repositories with GitHub (github.com) URLs. Local paths and non-GitHub providers aren't supported.
129
+
130
+
> [!IMPORTANT]
131
+
> Cloud Coding Agent delegation requires repositories to have **GitHub (github.com) repository URLs**. Repositories specified with local paths or hosted on non-GitHub providers (GitLab, Azure DevOps) are skipped during cloud delegation. Use local execution for those repositories.
100
132
101
133
> [!TIP]
102
134
> By processing repositories in parallel, Cloud Coding Agent delegation can reduce total modernization time from hours to minutes.
@@ -118,10 +150,10 @@ Batch upgrade supports two execution modes and two interaction methods:
118
150
> [!NOTE]
119
151
> You can combine any execution mode with any interaction method. For example:
@@ -144,23 +176,31 @@ After you configure your repositories and choose an execution mode, start the ba
144
176
modernize
145
177
```
146
178
147
-
1.The agent detects the `repos.json` file and displays the repository list:
179
+
1.Select **Upgrade** from the main menu.
148
180
149
-
:::image type="content" source="../media/modernization-agent/upgrade-repo-list.png" alt-text="Screenshot of Modernize CLI that shows the Choose repositories list in the terminal." lightbox="../media/modernization-agent/upgrade-repo-list.png":::
181
+
:::image type="content" source="../media/modernization-agent/upgrade-menu.png" alt-text="Screenshot of Modernize CLI that shows the main menu with the Upgrade option in the terminal." lightbox="../media/modernization-agent/upgrade-menu.png":::
150
182
151
-
1.Select repositories to upgrade, and press `Enter`to confirm your selection.
183
+
1.Choose how to specify your target repositories. Select **From a config file**to use a `repos.json` file.
152
184
153
-
-**Press `Ctrl+A`** to select all repositories.
154
-
-**Or use arrow keys** to navigate and press `Enter` to select individual repositories.
185
+
:::image type="content" source="../media/modernization-agent/source-type-selection.png" alt-text="Screenshot of Modernize CLI that shows the source type selection in the terminal." lightbox="../media/modernization-agent/source-type-selection.png":::
155
186
156
-
1. Select **2. Upgrade** from the main menu.
187
+
> [!TIP]
188
+
> You can also select **Manual input** to enter local paths or remote Git URLs directly, or **Current folder** to upgrade the project in your current directory.
157
189
158
-
:::image type="content" source="../media/modernization-agent/upgrade-menu.png" alt-text="Screenshot of Modernize CLI that shows the Upgrade Runtime & Framework menu option in the terminal." lightbox="../media/modernization-agent/upgrade-menu.png":::
190
+
1. If the `repos.json` file is detected at the default location, the agent automatically fills it in. Otherwise, enter the path to your config file and press <kbd>Enter</kbd>.
159
191
160
-
1. To run the upgrade, select **1. Upgrade locally**.
192
+
1. All repositories are selected by default. Deselect any repositories you want to skip, and then press <kbd>Enter</kbd> to confirm your selection.
193
+
194
+
-**Use arrow keys** to navigate and press <kbd>Space</kbd> to toggle individual repositories.
195
+
196
+
:::image type="content" source="../media/modernization-agent/upgrade-repo-list.png" alt-text="Screenshot of Modernize CLI that shows the Choose repositories list in the terminal." lightbox="../media/modernization-agent/upgrade-repo-list.png":::
197
+
198
+
1. Choose the execution mode. Select **Upgrade locally**.
161
199
162
200
:::image type="content" source="../media/modernization-agent/upgrade-local-option.png" alt-text="Screenshot of Modernize CLI that shows the Upgrade locally menu option in the terminal." lightbox="../media/modernization-agent/upgrade-local-option.png":::
163
201
202
+
1. Enter the upgrade target prompt (for example, `Java 21` or `.NET 10`) or press <kbd>Enter</kbd> to accept the default (latest LTS version).
203
+
164
204
1. The agent automatically:
165
205
166
206
- Creates an upgrade plan based on your request.
@@ -206,21 +246,26 @@ Before running the upgrade, configure the GitHub Copilot Modernization MCP Serve
206
246
modernize
207
247
```
208
248
209
-
1. The agent detects the `repos.json` file and displays the repository list:
249
+
1. Select **Upgrade** from the main menu.
210
250
211
-
:::image type="content" source="../media/modernization-agent/upgrade-repo-list.png" alt-text="Screenshot of Modernize CLI that shows the repository list in terminal." lightbox="../media/modernization-agent/upgrade-repo-list.png":::
251
+
:::image type="content" source="../media/modernization-agent/upgrade-menu.png" alt-text="Screenshot of Modernize CLI that shows the main menu with the Upgrade option in the terminal." lightbox="../media/modernization-agent/upgrade-menu.png":::
212
252
213
-
1. Select repositories to upgrade, and press `Enter` to confirm your selection.
253
+
1. Choose how to specify your target repositories. Select **From a config file**.
214
254
215
-
- **Press `Ctrl+A`** to selectall repositories.
216
-
- **Or use arrow keys** to navigate and press `Enter` to selectindividual repositories.
255
+
:::image type="content" source="../media/modernization-agent/source-type-selection.png" alt-text="Screenshot of Modernize CLI that shows the source type selection in the terminal." lightbox="../media/modernization-agent/source-type-selection.png":::
217
256
218
-
1. Select **2. Upgrade** from the main menu.
257
+
1. If the `repos.json` file is detected at the default location, the agent automatically fills it in. Otherwise, enter the path to your config file and press <kbd>Enter</kbd>.
219
258
220
-
1. To run the upgrade, select**2. Delegate to Cloud Coding Agents**.
259
+
1. All repositories are selected by default. Deselect any repositories you want to skip, and then press <kbd>Enter</kbd> to confirm your selection. Use arrow keys to navigate and press <kbd>Space</kbd> to toggle individual repositories.
260
+
261
+
:::image type="content" source="../media/modernization-agent/upgrade-repo-list.png" alt-text="Screenshot of Modernize CLI that shows the repository list in terminal." lightbox="../media/modernization-agent/upgrade-repo-list.png":::
262
+
263
+
1. Choose the execution mode. Select **Delegate to Cloud Agents**.
221
264
222
265
:::image type="content" source="../media/modernization-agent/upgrade-delegate-option.png" alt-text="Screenshot of Modernize CLI that shows the Delegate to Cloud Coding Agents menu option in the terminal." lightbox="../media/modernization-agent/upgrade-delegate-option.png":::
223
266
267
+
1. Enter the upgrade target prompt (for example, `Java 21`) or press <kbd>Enter</kbd> to accept the default.
268
+
224
269
1. The agent automatically:
225
270
226
271
- Creates upgrade plans for each repository.
@@ -246,19 +291,23 @@ Before running the upgrade, configure the GitHub Copilot Modernization MCP Serve
246
291
247
292
For automation and CI/CD integration, use the `modernize upgrade` command:
248
293
249
-
**Upgrade locally:**
294
+
**Upgrade locally using a repository config file:**
> For batch headless execution and more CLI options, see the [Multi-repository configuration](cli-commands.md#multi-repository-configuration) section in the CLI commands reference.
0 commit comments