Skip to content

Commit 54de79c

Browse files
docs: document update-work-item safe output tool and add to architecture tree (#82)
* Initial plan * docs: add update_work_item.rs to architecture tree and document update-work-item safe output tool Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com> Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/6afb6063-350a-40f4-99b6-2dfe12abbafd --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
1 parent cf5e6b5 commit 54de79c

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Alongside the correctly generated pipeline yaml, an agent file is generated from
4242
│ ├── create_pr.rs
4343
│ ├── create_wiki_page.rs
4444
│ ├── create_work_item.rs
45+
│ ├── update_work_item.rs
4546
│ ├── update_wiki_page.rs
4647
│ ├── memory.rs
4748
│ ├── missing_data.rs
@@ -778,6 +779,41 @@ Creates an Azure DevOps work item.
778779
- `repository` - Repository name override (defaults to BUILD_REPOSITORY_NAME)
779780
- `branch` - Branch name to link to (default: "main")
780781

782+
#### update-work-item
783+
Updates an existing Azure DevOps work item. Each field that can be modified requires explicit opt-in via configuration to prevent unintended updates.
784+
785+
**Agent parameters:**
786+
- `id` - Work item ID to update (required, must be a positive integer)
787+
- `title` - New title for the work item (optional, requires `title: true` in config)
788+
- `body` - New description in markdown format (optional, requires `body: true` in config)
789+
- `state` - New state (e.g., `"Active"`, `"Resolved"`, `"Closed"`; optional, requires `status: true` in config)
790+
- `area_path` - New area path (optional, requires `area-path: true` in config)
791+
- `iteration_path` - New iteration path (optional, requires `iteration-path: true` in config)
792+
- `assignee` - New assignee email or display name (optional, requires `assignee: true` in config)
793+
- `tags` - New tags, replaces all existing tags (optional, requires `tags: true` in config)
794+
795+
At least one field must be provided for update.
796+
797+
**Configuration options (front matter):**
798+
```yaml
799+
safe-outputs:
800+
update-work-item:
801+
status: true # enable state/status updates via `state` parameter (default: false)
802+
title: true # enable title updates (default: false)
803+
body: true # enable body/description updates (default: false)
804+
markdown-body: true # store body as markdown in ADO (default: false; requires ADO Services or Server 2022+)
805+
title-prefix: "[bot] " # only update work items whose title starts with this prefix
806+
tag-prefix: "agent-" # only update work items that have at least one tag starting with this prefix
807+
max: 3 # maximum number of update-work-item outputs allowed per run (default: 1)
808+
target: "*" # "*" (default) allows any work item ID, or set to a specific work item ID number
809+
area-path: true # enable area path updates (default: false)
810+
iteration-path: true # enable iteration path updates (default: false)
811+
assignee: true # enable assignee updates (default: false)
812+
tags: true # enable tag updates (default: false)
813+
```
814+
815+
**Security note:** Every field that can be modified requires explicit opt-in (`true`) in the front matter configuration. If the `max` limit is exceeded, additional entries are skipped rather than aborting the entire batch.
816+
781817
#### create-pull-request
782818
Creates a pull request with code changes made by the agent. When invoked:
783819
1. Generates a patch file from `git diff` capturing all changes in the specified repository

0 commit comments

Comments
 (0)