Skip to content

Add issue field updates to update_issue safe output#31005

Closed
Copilot wants to merge 4 commits into
mainfrom
copilot/add-issue-fields-support-update-issue
Closed

Add issue field updates to update_issue safe output#31005
Copilot wants to merge 4 commits into
mainfrom
copilot/add-issue-fields-support-update-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

update_issue could not modify issue fields, creating a capability gap with create_issue and forcing separate tooling for field-only updates. This PR adds first-class fields support to update_issue with partial-update semantics and actionable validation errors.

  • Handler behavior: field updates on update_issue

    • Extended actions/setup/js/update_issue.cjs to accept optional fields entries ([{ name, value }]).
    • Added normalization/validation for field payload shape and value types.
    • Implemented GraphQL-backed field application (setIssueFieldValue) with type-aware mapping (text/number/date/single-select/iteration).
    • Preserves partial update behavior: only provided properties are modified; supports fields-only updates.
  • Schema and tool contract updates

    • Added fields to update_issue input schema in:
      • actions/setup/js/safe_outputs_tools.json
      • pkg/workflow/js/safe_outputs_tools.json
      • schemas/agent-output.json
    • Updated TypeScript safe-output types (actions/setup/js/types/safe-outputs.d.ts) to include UpdateIssueItem.fields.
  • Validation model alignment

    • Updated workflow validation config (pkg/workflow/safe_outputs_validation_config.go) so update_issue accepts field/metadata-only payloads via:
      • requiresOneOf:status,title,body,labels,assignees,milestone,fields
    • Added coverage for this config change in pkg/workflow/safe_output_validation_config_test.go.
    • Updated JS validator fixture tests to match expanded update_issue validation shape.
  • Focused test coverage

    • Added/updated tests for:
      • successful field application
      • fields-only update path
      • invalid fields payload
      • unknown field name / invalid value error messaging
{
  "type": "update_issue",
  "issue_number": 123,
  "fields": [
    { "name": "Priority", "value": "High" },
    { "name": "Target Date", "value": "2026-05-15" }
  ]
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name cfg - (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw **/*.json --ignore-path ache/go/1.25.8/xTest User sRem�� se 666373/b270/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet tierignore (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name with-tools.md infocmp ache/uv/0.11.11/x86_64/git xterm-color infocmp /usr/bin/git git rev-�� w/js/**/*.json' --ignore-path git /usr/bin/infocmp --show-toplevel git /usr/bin/gh infocmp (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel 1/x64/bin/node /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel sh /usr/bin/git 687306968/001 git bject.type] | @t--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolc--jq /usr/bin/git -bool -buildtags o.git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 64/pkg/tool/linu--jq sv ty-test.md cfg 64/pkg/tool/linu/repos/actions/github-script/git/ref/tags/v9 git remo�� (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 x_amd64/vet sv g/workflow/featugh g/workflow/imporapi bin/node git conf�� --get remote.origin.url /usr/bin/infocmp hub/workflows gh cal/bin/bash infocmp (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv -unreachable=false /tmp/go-build117666373/b165/vet.cfg 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git Gf1j/g249MWQPUj8git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/gh --show-toplevel ache/go/1.25.8/xrev-parse /usr/bin/git gh api /repos/actions/setup-go/git/ref/tags/v4 --jq /usr/bin/infocmp --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/gh infocmp (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --show-toplevel l /usr/bin/infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv k/gh-aw/gh-aw/.github/workflows/artifacts-summary.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv waysRecompiles3724168585/001 x_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv xterm-color gh /usr/bin/git /repos/actions/ggh --jq 666373/b405/cli./repos/actions/github-script/git/ref/tags/v9 git rev-�� --show-toplevel 666373/b405/cli.test /usr/bin/infocmp --get remote.origin.urrev-parse /usr/bin/git infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv xterm-color git /usr/bin/git --get remote.origin.urapi /usr/bin/git git rev-�� --show-toplevel git /usr/bin/infocmp (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -c=4 -nolocalimports -importcfg /tmp/go-build117666373/b395/importcfg -embedcfg /tmp/go-build117666373/b395/embedcfg -pack (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv json' --ignore-p-errorsas (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9.0.0
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv json' --ignore-path ../../../.pr**/*.json (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv 01 (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuremote /usr/bin/gh -unreachable=falgh /tmp/go-build117api 1/x64/bin/node gh api /repos/actions/github-script/git/ref/tags/v9 --jq /usr/bin/git ithub/workflows/git '/tmp/TestParseDrev-parse 1/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/gh 119783812 gh 1/x64/bin/node gh api /repos/actions/github-script/git/ref/tags/v9 --jq /usr/bin/git "prettier" --wrigit cessfully"; \ elrev-parse 1/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel x_amd64/vet /usr/bin/git --get-regexp --local x_amd64/vet git rev-�� --show-toplevel resolved$ (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv xterm-color ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 2258-14332/test-gh /tmp/go-build117api 64/pkg/tool/linu/repos/actions/github-script/git/ref/tags/v9 git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git P_71/F6Q9JjIZREDgit /tmp/go-build117rev-parse 1/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv ithub-script/git/ref/tags/v9 git bject.type] | @tsv /tmp/TestGuardPogit rev-parse ache/node/24.14.--show-toplevel git rev-�� --show-toplevel ache/node/24.14.1/x64/bin/node /usr/bin/git ets.TOKEN }} remote.origin.ur-1 me: String!) { xterm-color git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --show-toplevel -tests t -dirty" -o gh-awgh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv ErrorFormatting3106375338/001 -buildtags /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linutest@example.com -o runs/20260508-112258-14332/test-1204936693 -importcfg /usr/bin/git -s -w -buildmode=exe git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 x_amd64/vet sv (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel /home/REDACTED/work/gh-aw/gh-aw/pkg/stringutil/identifiers.go /usr/bin/git /*.js' --ignore-git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv e/git gh /usr/bin/git iant-1195240887 --jq 64/bin/sh git init�� /usr/bin/git git .cfg rite '**/*.cjs' git git es/.bin/node git (http block)
  • https://api.github.com/repos/aws-actions/configure-aws-credentials/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/node/24.14.1/x64/bin/node /usr/bin/git github.repositorgit test@example.comrev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git /tmp/gh-aw-test-gh remote om/myorg/myrepo.status git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git ons-test25269423git infocmp /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --get l /opt/hostedtoolcstatus git (http block)
  • https://api.github.com/repos/azure/login/git/ref/tags/v2
    • Triggering command: /usr/bin/gh gh api /repos/azure/login/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuv1.0.0 /usr/bin/git /tmp/go-build117git -trimpath /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/gh ansitiveImports2infocmp -trimpath /usr/bin/git gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/azure/login/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel infocmp /usr/bin/git xterm-color infocmp /usr/bin/gh git rev-�� --show-toplevel gh /usr/bin/gh /repos/actions/ginfocmp --jq /usr/bin/git gh (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel 666373/b471/importcfg /usr/bin/git k/gh-aw/gh-aw/pkgit k/gh-aw/gh-aw/pkrev-parse /opt/hostedtoolc--show-toplevel git rev-�� /ref/tags/v9 node sv /tmp/TestHashConinfocmp -dwarf=false /opt/hostedtoolcxterm-color gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git remote /usr/bin/git git rev-�� /ref/tags/v9 git sv /tmp/gh-aw-test-infocmp config om/myorg/myrepo.xterm-color gh (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linutest@example.com /usr/bin/gh 1204936693 /tmp/go-build117api rtcfg.link gh api /repos/actions/github-script/git/ref/tags/v9 --jq (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/gh CompiledOutput83gh --no-file-parallapi /usr/bin/sh gh api /repos/actions/github-script/git/ref/tags/v9 --jq (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv --get remote.origin.url /opt/hostedtoolcache/node/24.14.1/x64/bin/node 17859531/001 17859531/002/worrev-parse x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� github.event.inputs.enforce_all == 'true' && 'full-sweep (enforcv1.0.0 x_amd64/vet /usr/bin/git get --local 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv --show-toplevel k/gh-aw/gh-aw/ac--initial-branch=my-default /usr/bin/git y-frontmatter.mdgit gh in/sh git rev-�� --show-toplevel git /usr/bin/git ty-test.md git bin/sh git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 /tmp/go-build117666373/b456/_testmain.go sv .js' --ignore-pagit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 k/gh-aw/gh-aw sv json' --ignore-pgit git node git conf�� /ref/tags/v9 test@example.com sv te '**/*.cjs' '*git flow-test-12345 ache/node/24.14.--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-05-01 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-04-08 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-02-07 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name go 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 666373/b028/vet.cfg x_amd64/vet ./../.prettieriggit (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name infocmp 64/pkg/tool/linux_amd64/vet xterm-color git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name on ache/go/1.25.8/x64/pkg/tool/linu-buildmode=exe /../../.prettiergit erignore (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name gh 64/pkg/tool/linux_amd64/asm idator.test.cjs git --jq bject.type] | @tremove 64/pkg/tool/linuremote1 -c o-file-parallelism update_issue.test.cjs safe_output_type_validator.test.cjs collect_ndjson_outpgit gh h lect_ndjson_outpgit --jq bject.type] | @t--show-toplevel bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1234567890
    • Triggering command: /usr/bin/gh gh api repos/{owner}/{repo}/actions/runs/1234567890 --jq {databaseId: .id, number: .run_number, url: .html_url, status: .status, conclusion: .conclusion, workflowName: .name, workflowPath: .path, createdAt: .created_at, startedAt: .run_started_at, updatedAt: .updated_at, event: .event, headBranch: .head_branch, (http block)
    • Triggering command: /usr/bin/gh gh api repos/{owner}/{repo}/actions/runs/1234567890 --jq {databaseId: .id, number: .run_number, url: .html_url, status: .status, conclusion: .conclusion, workflowName: .name, workflowPath: .path, createdAt: .created_at, startedAt: .run_started_at, updatedAt: .updated_at, event: .event, headBranch: .head_branch, -template-expressions.md c8e2c18c4b9576f8--log-level=error /node --show-toplevel git /usr/bin/gh git tion�� test.cjs safe_output_type_validator.test.cjs collect_ndjson_output.test.cjs gh x_amd64/cgo /repos/actions/ggit --jq /usr/bin/git x_amd64/cgo (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /../../.prettiergit erignore (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name infocmp 64/pkg/tool/linux_amd64/cgo idator.test.cjs git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 666373/b030/vet.cfg cfg ./../.prettieriggit (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name gh 64/pkg/tool/linux_amd64/compile ithub-script/gitinfocmp --jq bject.type] | @txterm-color 64/pkg/tool/linux_amd64/compile k/gh�� g_.a elism 1/x64/bin/node nore utput.test.cjs ../../../.prettiadd node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name 666373/b011/vet.cfg 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 666373/b031/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet ./../.prettieriggit (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name elism 64/pkg/tool/linux_amd64/compile _validator.test.gh utput.test.cjs bject.type] | @tlist 64/pkg/tool/linu--json mpor�� /workflows k/gh-aw/gh-aw/ac100 k/gh-aw/gh-aw/ac--created nore --ignore-path ../../../.pretti--git-dir k/gh-aw/gh-aw/actions/setup/js/nremote.origin.url (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name 666373/b009/vet.cfg 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 666373/b033/vet.cfg cfg ./../.prettieriggit (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name infocmp 64/pkg/tool/linux_amd64/link xterm-color git /usr/bin/gh 64/pkg/tool/linux_amd64/link k/gh�� aw.test elism ortcfg.link nore utput.test.cjs ../../../.prettiuser.name 2cbgMoE7G08uUBtUTest User (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name cfg util.test (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 666373/b032/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet ./../.prettieriggit (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name git 64/pkg/tool/linux_amd64/vet --show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 erignore (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build117666373/b405/cli.test /tmp/go-build117666373/b405/cli.test -test.testlogfile=/tmp/go-build117666373/b405/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
    • Triggering command: /tmp/go-build3939793775/b405/cli.test /tmp/go-build3939793775/b405/cli.test -test.testlogfile=/tmp/go-build3939793775/b405/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true ithub-script/gitsh git bin/node eloper-action-main/dist/ripgrep/bin/linux-x64/rg--always ode_�� --show-toplevel git _modules/.bin/sh --show-toplevel nly gs|array tions/setup/js/safe_output_type_validator.cjs (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ps /usr/bin/git git l /usr/bin/gh git rev-�� --show-toplevel gh /usr/bin/git /repos/github/ghgit --jq /usr/bin/infocmp--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git --show-toplevel l /opt/hostedtoolc/tmp/gh-aw/aw-feature-branch.patch git rev-�� --show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node /usr/bin/git secrets.TOKEN git /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv se 666373/b228/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv 3396454623 git 1/x64/bin/node ignore-path ../.gh git sv node -has�� SameOutput200486--workflow git e_modules/.bin/n--limit _output_type_valgit git /usr/bin/infocmp/tmp/TestCollectWorkflowFiles_WithImports657260385/001 sh (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv */*.ts' '**/*.js--detach (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv /repos/actions/github-script/git--ignore-path --jq k/gh-aw/node_modules/.bin/node install --package-lock-oapi /usr/bin/gh infocmp ache�� tmatter-with-arrays.md gh tions/setup/js/node_modules/.bin/sh /repos/actions/gnode --jq (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv 889497911/.github/workflows --jq tions/setup/js/node_modules/.bin../../../.prettierignore /repos/actions/ggit --jq re-branch infocmp tion�� th .prettierignore --log-level=error git de_modules/.bin/sh --show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv json' --ignore-path ../../../.pr**/*.json infocmp ache/go/1.25.8/x64/bin/node nore (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv json' --ignore-path ../../../.pr**/*.json gh de_modules/.bin/node 'origin' 'origin' repository(owne--show-toplevel infocmp tion�� ned-imports-enabled-with-env-template-expressions-in-body.md git ode_modules/.bin/node collect_ndjson_ogit git /usr/bin/git erignore (http block)
  • https://api.github.com/repos/google-github-actions/auth/git/ref/tags/v2
    • Triggering command: /usr/bin/gh gh api /repos/google-github-actions/auth/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/compile-insgit rev-parse /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel node /usr/bin/git /tmp/TestHashCongit x_amd64/vet om/org1/repo1.gi--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/google-github-actions/auth/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel infocmp /usr/bin/git ithub-script/gitgit gh bject.type] | @t--show-toplevel git rev-�� --show-toplevel git /usr/bin/git thImports6572603git e/git om/upstream/repo--show-toplevel git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv se 666373/b232/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv rite '**/*.cjs' '**/*.ts' '**/*.json' --ignore-p--exclude-hidden=receive git 1/x64/bin/node ignore-path .././usr/bin/git git ode-gyp-bin/sh node t-ha�� SameOutput2004866427/001/stability-test.md infocmp in/node _output_type_valinfocmp git /usr/bin/gh sh (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion tierignore git bin/linux-x64/rg--show-toplevel node /hom�� approach-validator.md ../../../**/*.json k lect_ndjson_outpgit ../../../.prettirev-parse /usr/bin/infocmp--show-toplevel sh (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo cal/bin/git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo ache/go/1.25.8/x64/bin/git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state rtcfg.link pkg/actionpins/dgit (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel infocmp /sh xterm-color git /usr/bin/git git rev-�� w/js/**/*.json' --ignore-path git ules/.bin/node --show-toplevel git /usr/bin/git gh (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch --write **/*.cjs $name) { hasDiscussionsEnabled } } **/*.json --ignore-path ../../../.pretti--git-dir ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -c 2258-14332/test-694837960/.github/workflows (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch 3551621826 ../../../**/*.json $name) { hasDiscussionsEnabled } } lect_ndjson_outpgit ../../../.prettirev-parse /usr/bin/gh sh ranc�� tsc --noEmit gh e_modules/.bin/sh /repos/actions/gsh --jq erignore /opt/hostedtoolcsh (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 8, 2026 that may be closed by this pull request
6 tasks
Copilot AI and others added 3 commits May 8, 2026 11:24
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/13b26e33-119a-4c42-a27a-d35da81dd400

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This reverts commit 6e4cbe4.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add issue fields support to update-issue safe output Add issue field updates to update_issue safe output May 8, 2026
Copilot AI requested a review from pelikhan May 8, 2026 11:36
@pelikhan pelikhan marked this pull request as ready for review May 8, 2026 12:11
Copilot AI review requested due to automatic review settings May 8, 2026 12:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class support for updating GitHub “issue fields” via the update_issue safe-output/tool, aligning its capabilities more closely with create_issue and enabling fields-only updates with validation.

Changes:

  • Extended update_issue handler to accept/normalize fields and apply them via GraphQL setIssueFieldValue, including a fields-only update path.
  • Updated safe-output/tool schemas and validation config to allow fields as an update dimension (requiresOneOf:...fields).
  • Added/updated JS and Go tests/fixtures to cover the expanded update_issue validation shape and basic field-update behavior.
Show a summary per file
File Description
schemas/agent-output.json Adds fields to UpdateIssueOutput and updates description text.
pkg/workflow/safe_outputs_validation_config.go Allows update_issue payloads that update fields/metadata-only via requiresOneOf:...fields.
pkg/workflow/safe_output_validation_config_test.go Adds coverage for the updated update_issue validation config and updates the allowlist of custom validations.
pkg/workflow/js/safe_outputs_tools.json Extends update_issue tool schema/description to include fields.
actions/setup/js/update_issue.cjs Implements normalization/validation and GraphQL application of issue fields; supports fields-only updates.
actions/setup/js/update_issue.test.cjs Adds tests for field normalization, fields-only updates, and unknown field error messaging.
actions/setup/js/types/safe-outputs.d.ts Extends UpdateIssueItem TypeScript type with fields.
actions/setup/js/safe_outputs_tools.json Extends update_issue tool schema/description to include fields.
actions/setup/js/safe_output_type_validator.test.cjs Updates validation fixture to include fields in update_issue and tests fields-only validation.
actions/setup/js/collect_ndjson_output.test.cjs Updates validator fixture config for update_issue to include fields/metadata updates.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 9/10 changed files
  • Comments generated: 6

Comment on lines +31 to +59
function normalizeIssueFields(fields) {
if (fields == null) {
return [];
}
if (!Array.isArray(fields)) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields' must be an array of objects`);
}

return fields.map((field, index) => {
if (!field || typeof field !== "object" || Array.isArray(field)) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}]' must be an object with 'name' and 'value'`);
}

const name = typeof field.name === "string" ? field.name.trim() : "";
if (!name) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}].name' must be a non-empty string`);
}

if (!Object.prototype.hasOwnProperty.call(field, "value")) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}]' is missing required 'value'`);
}

const value = field.value;
if ((typeof value !== "string" && typeof value !== "number") || (typeof value === "number" && !Number.isFinite(value))) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}].value' for "${name}" must be a string or number`);
}

return { name, value };
});
Comment on lines +23 to +60
const ISSUE_FIELD_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;

/**
* Normalize and validate issue fields payload for update_issue.
* Ensures fields are objects with a non-empty name and string/number value.
* @param {any} fields
* @returns {Array<{name: string, value: string|number}>}
*/
function normalizeIssueFields(fields) {
if (fields == null) {
return [];
}
if (!Array.isArray(fields)) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields' must be an array of objects`);
}

return fields.map((field, index) => {
if (!field || typeof field !== "object" || Array.isArray(field)) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}]' must be an object with 'name' and 'value'`);
}

const name = typeof field.name === "string" ? field.name.trim() : "";
if (!name) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}].name' must be a non-empty string`);
}

if (!Object.prototype.hasOwnProperty.call(field, "value")) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}]' is missing required 'value'`);
}

const value = field.value;
if ((typeof value !== "string" && typeof value !== "number") || (typeof value === "number" && !Number.isFinite(value))) {
throw new Error(`${ERR_VALIDATION}: update_issue 'fields[${index}].value' for "${name}" must be a string or number`);
}

return { name, value };
});
}
Comment thread schemas/agent-output.json
@@ -221,6 +221,25 @@
"type": "string",
"description": "New body content for the issue"
},
Comment thread schemas/agent-output.json
Comment on lines +224 to +242
"fields": {
"type": "array",
"description": "Optional issue fields to set after updating the issue",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Issue field name"
},
"value": {
"oneOf": [{ "type": "string" }, { "type": "number" }],
"description": "Issue field value"
}
},
"required": ["name", "value"],
"additionalProperties": false
}
},
Comment on lines +780 to +798
"fields": {
"type": "array",
"description": "Optional issue fields to set (e.g., Priority, Iteration, Start Date). Only specified fields are changed.",
"items": {
"type": "object",
"required": ["name", "value"],
"properties": {
"name": {
"type": "string",
"description": "Issue field name exactly as configured in the repository (e.g., \"Priority\", \"Iteration\")."
},
"value": {
"type": ["string", "number"],
"description": "Field value. Use string for text, single-select, iteration, and date (YYYY-MM-DD) fields; use number for numeric fields."
}
},
"additionalProperties": false
}
},
Comment on lines +909 to +933
"fields": {
"type": "array",
"description": "Optional issue fields to set (e.g., Priority, Iteration, Start Date). Only specified fields are changed.",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"description": "Issue field name exactly as configured in the repository (e.g., \"Priority\", \"Iteration\")."
},
"value": {
"type": [
"string",
"number"
],
"description": "Field value. Use string for text, single-select, iteration, and date (YYYY-MM-DD) fields; use number for numeric fields."
}
},
"additionalProperties": false
}
},
@pelikhan pelikhan closed this May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Add issue fields support to update-issue safe output

3 participants