Skip to content

Make assign-to-agent and create-agent-session safe-output types repository-aware - #17286

Merged
pelikhan merged 2 commits into
mainfrom
copilot/update-safe-output-types
Feb 20, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/update-safe-output-types

Conversation

Copilot AI commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor

assign-to-agent and create-agent-session had partial, inconsistent repo handling — reading from undocumented env vars (GH_AW_TARGET_REPO, GITHUB_AW_TARGET_REPO, GH_AW_AGENT_ALLOWED_REPOS, GH_AW_AGENT_SESSION_ALLOWED_REPOS) that the Go compiler never set, and lacked per-item repo field support.

Go compiler (compiler_safe_outputs_specialized.go)

  • Both step config builders now pass cfg.TargetRepoSlug to buildStepLevelSafeOutputEnvVars and emit GH_AW_ALLOWED_REPOS — the standardized env vars already consumed by other safe-output types.

Tool description enhancer (tool_description_enhancer.go)

  • Added TargetRepoSlug and AllowedRepos constraints to both tool descriptions, consistent with create_issue, add_comment, etc.

JavaScript scripts

  • Both scripts now use resolveTargetRepoConfig + resolveAndValidateRepo (the standardized helpers from repo_helpers.cjs) instead of inline env var logic.
  • Added per-item repo field support so the agent can target a specific allowed repository per call:
safe-outputs:
  assign-to-agent:
    target-repo: "myorg/main-repo"
    allowed-repos:
      - "myorg/other-repo"
{ "type": "assign_to_agent", "issue_number": 42, "agent": "copilot", "repo": "myorg/other-repo" }
{ "type": "create_agent_session", "body": "Implement feature X", "repo": "myorg/other-repo" }

The repo parameter is added dynamically to the MCP tool schema (via addRepoParameterIfNeeded) only when allowed-repos is configured — no change to safe_outputs_tools.json.

Tests

  • Updated cross-repository validation tests to exercise per-item repo field rejection/allowance rather than global target repo startup validation (which no longer exists — the default is always allowed, consistent with validateRepo semantics in other handlers).

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 /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 GO111MODULE 64/bin/go git init�� GOMODCACHE go /usr/bin/git -json GO111MODULE 64/bin/go git (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 go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (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 git /usr/bin/git sed ance�� s/.*"branch"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p git 0/x64/bin/node --show-toplevel (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 -json GO111MODULE g_.a GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha runs/20260220-213905-31533/test-1864394842/.github/workflows git 0370524/b343/vet.cfg l sh /usr/bin/git git rev-�� --show-toplevel git /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet --git-dir golangci-lint /usr/bin/git /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha --show-toplevel node 64/pkg/tool/linux_amd64/compile /tmp/TestHashCongit -dwarf=false /usr/bin/git 64/pkg/tool/linuconfig rev-�� --show-toplevel git ache/node/24.13.0/x64/bin/node --show-toplevel /tmp/go-build223-C ache/node/24.13./home/REDACTED/work/gh-aw/gh-aw/.github/workflows 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 0830/001/stability-test.md GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3701-27578/test-3362356535/.github/workflows GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha HEAD go /usr/bin/git ithub/workflows/infocmp GO111MODULE ipts.test git rev-�� --show-toplevel ipts.test /usr/bin/git --show-toplevel GOPROXY /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha ingutil.test GO111MODULE ortcfg.link GOINSECURE GOMOD GOMODCACHE YG5ENJPsn0nfHI1r4Y/pZ4ifq6VFAj2_--jq env -json GO111MODULE g_.a GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha vaScript4164219449/001/test-fron-errorsas GO111MODULE /opt/hostedtoolcache/go/1.25.0/x-nilfunc GOINSECURE GOMOD GOMODCACHE go env runs/20260220-213701-27578/test-2846545692/.github/workflows GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha /tmp/go-build3828755540/b433/scripts.test -importcfg /usr/bin/git -s -w -buildmode=exe git rev-�� --show-toplevel -extld=gcc /usr/bin/git --check **/*.cjs 64/bin/go git (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha k/gh-aw/gh-aw/pkg/sliceutil/sliceutil.go k/gh-aw/gh-aw/pkg/sliceutil/sliceutil_test.go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -o /tmp/go-build3828755540/b410/_pkg_.a -trimpath /usr/bin/git -p main -lang=go1.25 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha .github/workflows/test.md 0974251/b391/importcfg /usr/bin/git che/go-build/b7/git GOPROXY 64/bin/go git init�� 64/bin/go /opt/hostedtoolcache/go/1.25.0/xGO111MODULE /opt/hostedtoolcache/node/24.13.0/x64/bin/node /tmp/go-build156git -trimpath 64/bin/go /opt/hostedtoolcache/node/24.13.0/x64/bin/node (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 --show-toplevel git 0/x64/bin/bash /tmp/gh-aw-test-git config /usr/bin/git git rev-�� --show-toplevel git ache/node/24.13.0/x64/bin/node /home/REDACTED/wor/usr/bin/gh rev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel git 0/x64/bin/node runs/20260220-21git git /usr/lib/php/ses--git-dir gh auth�� 2613853440/.github/workflows /usr/lib/php/sessionclean 0/x64/bin/node 64/bin/go git e/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel git 0/x64/bin/node bility_SameInputgit git /usr/bin/expr git rev-�� --show-toplevel expr 0/x64/bin/node v1.0.0 1 /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --show-toplevel git ache/node/24.13.0/x64/bin/node /tmp/gh-aw-test-git config /usr/bin/git git _har�� --show-toplevel git ache/node/24.13.0/x64/bin/node 64/bin/go git /usr/bin/git 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 GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD s,MFiles,HFiles,-test.paniconexit0 go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha --show-toplevel node ache/node/24.13.0/x64/bin/node /tmp/TestHashCon/usr/bin/gh git /opt/hostedtoolcgraphql git _har�� --show-toplevel node ache/node/24.13.-f /home/REDACTED/worgit git /usr/bin/git git (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 -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env runs/20260220-213701-27578/test-3325815202/.github/workflows GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go l GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --get remote.origin.urrev-parse /usr/lib/git-cor--show-toplevel git rev-�� --show-toplevel /usr/lib/git-core/git ache/node/24.13.0/x64/bin/node run --auto /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha 1862828882 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link 0/x64/bin/node k/gh-aw/gh-aw/.ggit -importcfg /usr/bin/git git cjs --show-toplevel git 64/pkg/tool/linux_amd64/link --git-dir -extld=gcc /usr/bin/git 64/pkg/tool/linurev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link 0/x64/bin/node /tmp/go-build223git -importcfg /usr/bin/git git cjs --show-toplevel git 64/pkg/tool/linux_amd64/vet user.email test@example.com-C /usr/bin/git 64/pkg/tool/linurev-parse (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel git 0/x64/bin/node ithub/workflows/git git /usr/bin/git git ance�� -b feature-branch 0/x64/bin/node --show-toplevel git /opt/hostedtoolcxterm-color git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel git 0/x64/bin/node --show-toplevel git 0370524/b407/vet--show-toplevel git rev-�� --show-toplevel bash 0/x64/bin/node ons-test22938730/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet git 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --show-toplevel git 0/x64/bin/node k/gh-aw/gh-aw/.ggit node (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 vaScript4164219449/001/test-compv1.0.0 GO111MODULE /opt/hostedtoolcache/go/1.25.0/x/tmp/gh-aw-git-clone-3098289032 GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha sions/ race 0370524/b405/sliceutil.test user.email test@example.comrev-parse /usr/bin/git 0370524/b405/sliceutil.test e=/t�� t0 m0s /usr/bin/git test.txt go /usr/bin/git 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 --show-toplevel git 0/x64/bin/node --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --show-toplevel git 0/x64/bin/node sistency_WithImpgit git /snap/bin/bash git rev-�� b/workflows bash 0/x64/bin/node --noprofile git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha image:v1.0.0 git ache/node/24.13.0/x64/bin/node --show-toplevel git /usr/bin/git git _inc�� 4131-37650/test-3511011740/custom/workflows git ache/node/24.13.0/x64/bin/node -m Initial commit /usr/bin/git git (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel git $name) { hasDiscussionsEnabled } } --show-toplevel git /usr/bin/git git _har�� 4131-37650/test--f git ache/node/24.13.-f /tmp/file-trackegit /tmp/file-tracke-C 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel git ache/node/24.13.0/x64/bin/node /home/REDACTED/worgit rev-parse /usr/bin/infocmp/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git _har�� --show-toplevel infocmp ache/node/24.13.0/x64/bin/node xterm-color git ache/node/24.13./home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha ./cmd/gh-aw 0/x64/bin/node $name) { hasDiscussionsEnabled } } /tmp/TestHashStagit Q0FJI7-6ChqA /usr/bin/git git _har�� --show-toplevel git ache/node/24.13.0/x64/bin/node 64/bin/go git ache/node/24.13.xterm-color git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel git $name) { hasDiscussionsEnabled } } --show-toplevel -tests /usr/bin/git git _har�� --show-toplevel git ache/node/24.13.-f /tmp/shared-actiinfocmp config ache/node/24.13.xterm-color git (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 --show-toplevel git ache/node/24.13.0/x64/bin/node --show-toplevel git /usr/bin/git git _har�� --show-toplevel git ache/node/24.13.0/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha 3754063965 git ache/node/24.13.0/x64/bin/node /home/REDACTED/wor/usr/bin/gh rev-parse /opt/hostedtoolcgraphql git _har�� --show-toplevel node .cfg /home/REDACTED/worinfocmp git ache/node/24.13.xterm-color gh (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel git ache/node/24.13.0/x64/bin/node --show-toplevel git ache/node/24.13.graphql git _har�� --show-toplevel ache/node/24.13.owner=github ache/node/24.13.-f uts.version git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel git ache/node/24.13.-f /home/REDACTED/worgit rev-parse ache/node/24.13./home/REDACTED/work/gh-aw/gh-aw/.github/workflows git _har�� --show-toplevel ache/node/24.13.0/x64/bin/node ache/node/24.13.0/x64/bin/node ts.result git /tmp/go-build223/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel node ache/node/24.13.0/x64/bin/node /tmp/TestHashSta/usr/bin/gh tZlXwUW-heyy /opt/hostedtoolcgraphql git _har�� 4131-37650/test--f node ache/node/24.13.-f /home/REDACTED/worgit git 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha --show-toplevel node ache/node/24.13.0/x64/bin/node /tmp/TestHashCongit git /usr/bin/git git _har�� 260124202/.github/workflows git ache/node/24.13.0/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env e-analyzer.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile /usr/bin/git TOKEN"; }; f getgit TOKEN"; }; f getrev-parse 0/x64/bin/node git rev-�� --show-toplevel go ndor/bin/bash in:/usr/local/bigit GO111MODULE /opt/hostedtoolc--show-toplevel wc (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 --package-lock-only /usr/bin/git --show-toplevel /tmp/go-build382rev-parse ache/node/24.13.--show-toplevel git rev-�� --show-toplevel git 0/x64/bin/node sistency_GoAndJagit git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env hub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 --package-lock-only /usr/bin/git g/cli GO111MODULE /opt/hostedtoolcgithub.repository git rev-�� 7070/001/stability-test.md go /usr/bin/git -json l /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 git /usr/bin/git --show-toplevel /opt/hostedtoolc-C /usr/bin/git git rev-�� --show-toplevel git 0/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env hub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 --package-lock-only /usr/bin/git -json GO111MODULE /opt/hostedtoolc--git-dir git rev-�� 7070/001/stability-test.md go /usr/bin/git runs/20260220-21git GO111MODULE 0/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 --package-lock-only /usr/bin/git t0 m0s 0/x64/bin/node git rev-�� --show-toplevel git 0/x64/bin/node ithub/workflows/git git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel go /usr/bin/cut bin:/usr/local/b/opt/hostedtoolcache/node/24.13.0/x64/bin/node GO111MODULE 8755540/b394/vetgithub.token cut (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 --package-lock-only /usr/bin/git --show-toplevel ache/node/24.13.-C (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 go /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel go /usr/bin/grep r/bin:/usr/localgit GO111MODULE /opt/hostedtoolc--show-toplevel grep (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 --package-lock-only /usr/bin/git 0370524/b391/loggit /opt/hostedtoolc-C 0370524/b413/tes/tmp/gh-aw-test-runs/20260220-214131-37650/test-3754063965 git rev-�� --show-toplevel 0370524/b413/testutil.test 0/x64/bin/node t0 m0s 0370524/b391/_pk--show-toplevel grep (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go estl�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile /usr/bin/git 8755540/b399/_pkgit GO111MODULE 8755540/b399=> git rev-�� --show-toplevel go /usr/bin/head in:/usr/local/bigit l /opt/hostedtoolc--show-toplevel head (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 git /usr/bin/git r/test-repo/actigit git ache/node/24.13.HEAD git rev-�� --show-toplevel git 0/x64/bin/node sistency_GoAndJagit git /usr/bin/git sed (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 ache/go/1.25.0/x64/pkg/tool/linux_amd64/link /usr/bin/git 8755540/b399/loggit GO111MODULE 8755540/b399/imp--show-toplevel git rev-�� --show-toplevel yWdoVr4iAs4gc/sRj5iUykwnrH8Q9Natcx/AERBTSiwFBTdGDiIa9qx/H4W_iTHyWdoVr4iAs4gc /usr/bin/git in::/usr/local/bgit GO111MODULE 8755540/b399/_pk--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 git /usr/bin/git --show-toplevel node ache/go/1.25.0/x.github/workflows/test.md git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 0/x64/bin/node --show-toplevel git /usr/bin/git 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 GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 GOMOD GOMODCACHE go env GONW/NG1ioNrSB3rGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 0974251/b357/importcfg (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 GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha --show-current git 0/x64/bin/node --show-toplevel git /usr/bin/git git js --show-toplevel git /usr/bin/git runs/20260220-21/usr/bin/gh /usr/bin/git 0/x64/bin/node 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 ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git g_.a GO111MODULE ache/go/1.25.0/xtesting.testBinary=1 git rev-�� --show-toplevel go /usr/bin/git tfKvXnY3s GO111MODULE ache/go/1.25.0/x64/bin/go git (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha --show-toplevel git $name) { hasDiscussionsEnabled } } user.email test@example.com-V=full /opt/hostedtoolcache/node/24.13.user.name git cjs --show-toplevel node ache/node/24.13.0/x64/bin/node /tmp/TestHashCon/usr/bin/gh git clusion,workflowgraphql 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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3362356535/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha b/workflows nly /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--get git rev-�� --show-toplevel go /usr/bin/git 3701-27578/test-git GO111MODULE ache/go/1.25.0/xmaster git (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 GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion runs/20260220-21git GO111MODULE 8755540/b363/vet--show-toplevel git add initial.txt go /usr/bin/git -json GO111MODULE 8755540/b421/tes--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion 3905-31533/test-git node /usr/bin/git git rev-�� --show-toplevel git 0/x64/bin/node --show-toplevel TestBuildAssignTrev-parse /usr/bin/git git (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 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE erignore env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/node -json GO111MODULE 64/bin/go git 0/x6�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build3828755540/b380/cli.test /tmp/go-build3828755540/b380/cli.test -test.testlogfile=/tmp/go-build3828755540/b380/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go ache�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /tmp/go-build2230370524/b001/cli.test /tmp/go-build2230370524/b001/cli.test -test.testlogfile=/tmp/go-build2230370524/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git tmatter-with-arrgit GO111MODULE At,event,headBra--show-toplevel git (http block)
    • Triggering command: /tmp/go-build920005538/b356/cli.test /tmp/go-build920005538/b356/cli.test -test.testlogfile=/tmp/go-build920005538/b356/testlog.txt -test.paniconexit0 -test.timeout=10m0s run view 12345 /usr/bin/git TH" --json status,conclusion git rev-�� --show-toplevel git /usr/bin/git initial.txt go /usr/bin/git git (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 GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env GOPATH); \ if coGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -v go /usr/bin/git -json GO111MODULE 64/bin/go git 0/x6�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel Mp/X6R5OoPF4X40d7UERB47/QynuysYoTest User /usr/bin/git 7070/001/stabilinode go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git agent-performancnode test@example.comjs/fuzz_sanitize_output_harness.cjs /usr/bin/git git (http block)

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

Original prompt

Make the following safe-output types repository-aware: assign-to-agent and create-agent-session.

Update their safe-output definitions to:

  • Support target-repo and allowed-repos.
  • Use the standardized JavaScript helper to determine whether a repository is allowed to run on.
  • Generate tool parameter descriptions that support this repository-aware scenario.

Refer to existing implementations such as create-issue for the expected behavior and structure.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… repository-aware

- Go compiler now passes TargetRepoSlug and AllowedRepos env vars to both step configs
- Use standardized resolveTargetRepoConfig + resolveAndValidateRepo helpers in both scripts
- Add per-item repo field support in assign_to_agent.cjs and create_agent_session.cjs
- Update tool description enhancer to include TargetRepoSlug/AllowedRepos constraints
- Update tests to use new env var names (GH_AW_TARGET_REPO_SLUG, GH_AW_ALLOWED_REPOS)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update safe-output types to be repository-aware Make assign-to-agent and create-agent-session safe-output types repository-aware Feb 20, 2026
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot recompile

Copilot AI commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot recompile

Recompiled — all 153 workflow files were already up to date, no changes needed.

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 /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)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha (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 (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha (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 (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha /gh-aw (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha (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 (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

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

@pelikhan
pelikhan marked this pull request as ready for review February 20, 2026 22:11
Copilot AI review requested due to automatic review settings February 20, 2026 22:11
@pelikhan
pelikhan merged commit c3798d7 into main Feb 20, 2026
119 checks passed
@pelikhan
pelikhan deleted the copilot/update-safe-output-types branch February 20, 2026 22:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make assign-to-agent and create-agent-session safe-output types repository-aware by adding support for target-repo and allowed-repos configuration, standardizing environment variables, and implementing per-item repo field support. However, there is a critical incomplete implementation for create-agent-session.

Changes:

  • Standardized environment variables to GH_AW_TARGET_REPO_SLUG and GH_AW_ALLOWED_REPOS across both safe-output types
  • Added repository configuration resolution and validation using shared repo_helpers.cjs utilities
  • Updated tool descriptions to include repository constraints when configured

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/workflow/compiler_safe_outputs_specialized.go Updated to emit standardized env vars (GH_AW_TARGET_REPO_SLUG, GH_AW_ALLOWED_REPOS) for both safe-output types
pkg/workflow/tool_description_enhancer.go Added repository constraints to tool descriptions for both create_agent_session and assign_to_agent
actions/setup/js/create_agent_session.cjs Implemented resolveTargetRepoConfig and resolveAndValidateRepo for per-item repo validation
actions/setup/js/create_agent_session.test.cjs Updated tests to use standardized env var names and test per-item repo field validation
actions/setup/js/assign_to_agent.cjs Implemented resolveTargetRepoConfig and resolveAndValidateRepo for per-item repo validation
actions/setup/js/assign_to_agent.test.cjs Updated tests to use standardized env var names and test per-item repo field validation

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

Comment on lines +115 to +116
customEnvVars = append(customEnvVars, c.buildStepLevelSafeOutputEnvVars(data, cfg.TargetRepoSlug)...)
customEnvVars = append(customEnvVars, buildAllowedReposEnvVar("GH_AW_ALLOWED_REPOS", cfg.AllowedRepos)...)

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

The allowed-repos configuration will never be populated for create-agent-session because pkg/workflow/create_agent_session.go::parseAgentSessionConfig does not parse this field from the YAML configuration.

While the struct CreateAgentSessionConfig has the AllowedRepos field defined (line 16), the parsing function manually parses individual fields and doesn't include allowed-repos. This means cfg.AllowedRepos will always be an empty slice, and buildAllowedReposEnvVar will never emit the GH_AW_ALLOWED_REPOS environment variable.

As a result, the JavaScript code will work correctly but the feature won't function as described in the PR because users cannot configure allowed-repos in their YAML workflow files for create-agent-session.

To fully implement this feature, pkg/workflow/create_agent_session.go::parseAgentSessionConfig needs to be refactored to use unmarshalConfig (similar to how assign-to-agent works) so that all fields with yaml tags are automatically parsed.

Copilot uses AI. Check for mistakes.
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.

3 participants