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: AGENTS.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,7 @@ schedule: daily around 14:00 # Fuzzy schedule syntax - see Schedule Syntax secti
144
144
# branches:
145
145
# - main
146
146
# - release/*
147
-
workspace: repo # Optional: "root" or "repo". If not specified, defaults based on checkout configuration (see below).
147
+
workspace: repo # Optional: "root", "repo" (alias: "self"), or a checked-out repository alias. If not specified, defaults based on checkout configuration (see below).
148
148
pool: AZS-1ES-L-MMS-ubuntu-22.04 # Agent pool name (string format). Defaults to AZS-1ES-L-MMS-ubuntu-22.04.
149
149
# pool: # Alternative object format (required for 1ES if specifying os)
150
150
# name: AZS-1ES-L-MMS-ubuntu-22.04
@@ -762,15 +762,27 @@ If `timeout-minutes` is not configured, this is replaced with an empty string.
762
762
Should be replaced with the appropriate working directory based on the effective workspace setting.
763
763
764
764
**Workspace Resolution Logic:**
765
-
1. If `workspace` is explicitly set in front matter, that value is used
765
+
1. If `workspace` is explicitly set in front matter, that value is used (after validation)
766
766
2. If `workspace` is not set and `checkout:` contains additional repositories, defaults to `repo`
767
767
3. If `workspace` is not set and only `self` is checked out, defaults to `root`
768
768
769
-
**Warning:** If `workspace: repo` is explicitly set but no additional repositories are in `checkout:`, a warning is emitted because when only `self` is checked out, `$(Build.SourcesDirectory)` already contains the repository content directly.
769
+
**Warning:** If `workspace: repo` (or `self`) is explicitly set but no additional repositories are in `checkout:`, a warning is emitted because when only `self` is checked out, `$(Build.SourcesDirectory)` already contains the repository content directly.
770
770
771
-
**Values:**
772
-
- `root`: `$(Build.SourcesDirectory)`- the checkout root directory
773
-
- `repo`: `$(Build.SourcesDirectory)/$(Build.Repository.Name)`- the repository's subfolder
771
+
**Accepted values:**
772
+
- `root`→ `$(Build.SourcesDirectory)` — the checkout root directory
773
+
- `repo`(or `self`) → `$(Build.SourcesDirectory)/$(Build.Repository.Name)` — the trigger repository's subfolder
774
+
- `<alias>`→ `$(Build.SourcesDirectory)/<alias>` — a specific checked-out repository's subfolder. The alias must appear in the `checkout:` list (which itself must be a subset of `repositories:`). This form is only valid when at least one additional repository is checked out; otherwise compilation fails.
775
+
776
+
**Example — pointing the agent's workspace at a checked-out repository:**
777
+
```yaml
778
+
repositories:
779
+
- repository: exp23-a7-nw
780
+
type: git
781
+
name: msazuresphere/exp23-a7-nw
782
+
checkout:
783
+
- exp23-a7-nw
784
+
workspace: exp23-a7-nw # Resolves to $(Build.SourcesDirectory)/exp23-a7-nw
785
+
```
774
786
775
787
This is used for the `workingDirectory` property of the copilot task.
0 commit comments