Skip to content

Extract Copilot PR Analysis Base Setup into shared component#17797

Merged
pelikhan merged 2 commits intomainfrom
copilot/refactor-copilot-pr-analysis-setup
Feb 23, 2026
Merged

Extract Copilot PR Analysis Base Setup into shared component#17797
pelikhan merged 2 commits intomainfrom
copilot/refactor-copilot-pr-analysis-setup

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

Four workflows (copilot-pr-nlp-analysis, copilot-pr-prompt-analysis, copilot-agent-analysis, copilot-pr-merged-report) repeated the same imports and tool config — shared/jqschema.md + shared/reporting.md + shared/copilot-pr-data-fetch.md plus github: toolsets: [default], edit:, and bash: ["*"].

Changes

  • New: shared/copilot-pr-analysis-base.md — bundles the common imports and tools, plus guidance on repo-memory configuration and common jq queries

    tools:
      github:
        toolsets: [default]
      edit:
      bash: ["*"]
    imports:
      - shared/jqschema.md
      - shared/reporting.md
      - shared/copilot-pr-data-fetch.md
  • copilot-pr-nlp-analysis.md, copilot-pr-prompt-analysis.md, copilot-agent-analysis.md: replaced the three shared imports and redundant tool entries with a single shared/copilot-pr-analysis-base.md import; workflow-specific repo-memory config remains inline

  • copilot-pr-merged-report.md: replaced shared/reporting.md with shared/copilot-pr-analysis-base.md (gains jqschema + copilot-pr-data-fetch); retains github: false override and shared/gh.md

  • Lock files regenerated via make recompile (all 158 workflows compile successfully)

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)
    • 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 l ml -docs-review.lock.yml chec�� ker.lock.yml (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 scripts/**/*.js 64/bin/go git -C /tmp/shared-actions-test2950243858 rev-parse /usr/bin/git -json GO111MODULE 64/bin/go git (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 -unreachable=false /tmp/go-build632617250/b082/vet.cfg 617250/b380/vet.cfg dad15df454799415git GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build632617250/b202/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet 0040155/b408/_pkgit GO111MODULE 64/bin/go /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 (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 tformat GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 blog-auditor.md GO111MODULE /opt/hostedtoolcache/go/1.25.0/x-lang=go1.25 GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x-dwarf=false -uns�� runs/20260223-002912-29358/test-go1.25.0 /tmp/go-build632617250/b057/vet.-c=4 617250/b342/vet.cfg GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x/tmp/go-build632617250/b431/_testmain.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha se 617250/b061/vet.cfg Name,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu-dwarf=false -uns�� runs/20260223-002912-29358/test-952152192/.githugo1.25.0 /tmp/go-build632617250/b111/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu-nolocalimports l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu/tmp/go-build632617250/b422/_testmain.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha = get && echo "******"; }; f get = get && echo "******"; }; f get /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet 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 3044683140/.github/workflows cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build632617250/b074/vet.cfg ache/node/24.13.0/x64/bin/node -json 1nAi/Qt7LOO4MgTl-c 64/bin/go git t-43�� bility_SameInputSameOutput3552844784/001/stability-test.md rev-parse /usr/bin/git "prettier" --chegit ache/go/1.25.0/xrev-parse 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha GOMODCACHE x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet /usr/bin/git (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)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha ACCEPT (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 run lint:cjs 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --che-errorsas sh 64/bin/go "prettier" --wri/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha 0040155/b398/embedcfg **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti-unreachable=false u69dtnPwupbS -o /tmp/go-build2220040155/b380/_pkGOINSECURE -trimpath 64/bin/go -p github.com/githu-atomic -lang=go1.25 go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha che/go-build/73/73025ddd55bd2547GOINSECURE **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti-bool go list�� -m -json 64/bin/go "prettier" --wri/tmp/go-build632617250/b393/envutil.test (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/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/x-test.short=true GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� runs/20260223-002912-29358/test-3428692688/.github/workflows /tmp/go-build632617250/b050/vet.cfg 617250/b307/vet.cfg GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha vaScript2171599583/001/test-comp-s GO111MODULE Name,createdAt,startedAt,updated-buildmode=exe GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x-extld=gcc -uns�� runs/20260223-002912-29358/test-3428692688/.github/workflows /tmp/go-build632617250/b036/vet.cfg 617250/b345/vet.cfg GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --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 (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)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha copilot-pr-nlp-analysis.md (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/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/pkg/tool/linu-nilfunc GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu-tests env tmatter-with-arrays.md cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet stlo�� -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet stlo�� -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuorigin (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE x_amd64/cgo GOINSECURE GOMOD GOMODCACHE x_amd64/cgo env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE x_amd64/vet GOINSECURE 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/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE x_amd64/cgo GOINSECURE GOMOD GOMODCACHE x_amd64/cgo env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --che-errorsas node 64/bin/go tierignore ../../../pkg/wor-atomic 64/bin/go 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 unsafe 64/bin/go 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 6 GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (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/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 -json GO111MODULE 64/pkg/tool/linu-importcfg GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/styles/theme_test.go env 1186227242/.github/workflows cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (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)
  • 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/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (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 64/pkg/tool/linux_amd64/vet env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • 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)
  • 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 GOSUMDB GOWORK 64/bin/go node /hom�� --check scripts/**/*.js 64/bin/go .prettierignore ../../../pkg/wor-atomic 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go **/*.ts **/*.json --ignore-path node /hom�� --check scripts/**/*.js 64/bin/go .prettierignore cmd/gh-aw/argume-atomic 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go view 12345 /usr/bin/git node /opt�� prettier --write de !../../../pkg/wonode --ignore-path ../../../.prettiprettier go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build632617250/b381/cli.test /tmp/go-build632617250/b381/cli.test -test.testlogfile=/tmp/go-build632617250/b381/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE 0040155/b381/imp-buildtags /hom�� che/go-build/d2/-errorsas **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti-bool /opt/hostedtoolc-buildtags (http block)
    • Triggering command: /tmp/go-build1563927335/b381/cli.test /tmp/go-build1563927335/b381/cli.test -test.testlogfile=/tmp/go-build1563927335/b381/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true **/*.ts **/*.json --ignore-path node /opt�� run format:pkg-json 64/bin/go tierignore 64/pkg/tool/linu-c run-script/lib/n"prettier" --check '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.prettierignore go (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 npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --che-errorsas node 64/bin/go tierignore ../../../pkg/wor-atomic 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name "prettier" --wriGOINSECURE git 64/bin/go --show-toplevel x_amd64/vet 0/x64/bin/node sh -c npx prettier --wGOINSECURE git 64/bin/go --show-toplevel 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/prettier /usr/bin/git go (http block)

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

Original prompt

This section details on the original issue you should resolve

<issue_title>[refactoring] Extract Copilot PR Analysis Base Setup into shared component</issue_title>
<issue_description>### Skill Overview

Four workflows perform Copilot PR analysis using an identical combination of tools: shared/copilot-pr-data-fetch.md (already shared), repo-memory with standardized config structure, github: toolsets: [default], edit:, and bash: ["*"]. The repo-memory configuration is particularly repetitive — each workflow has the same 102400 max-file-size and ["*.json", "*.jsonl", "*.csv", "*.md"] file-glob pattern. A shared base component would bundle these common elements.

Current Usage

This skill appears in the following workflows:

  • copilot-pr-nlp-analysis.md (repo-memory branch: memory/nlp-analysis)
  • copilot-pr-prompt-analysis.md (repo-memory branch: memory/prompt-analysis)
  • copilot-agent-analysis.md (repo-memory branch: memory/copilot-agent-analysis)
  • copilot-pr-merged-report.md (imports shared/copilot-pr-data-fetch.md)

Proposed Shared Component

File: .github/workflows/shared/copilot-pr-analysis-base.md

Configuration:

---
tools:
  github:
    toolsets: [default]
  edit:
  bash: ["*"]

imports:
  - shared/jqschema.md
  - shared/reporting.md
  - shared/copilot-pr-data-fetch.md
---

Markdown body (prompt guidance):

## Copilot PR Analysis Base

Pre-fetched Copilot PR data is available at `/tmp/gh-aw/pr-data/copilot-prs.json` (last 30 days, up to 1000 PRs from `copilot/*` branches).

### Historical Data with repo-memory

Each analysis workflow should store historical results in `repo-memory` for trend tracking.
Recommended repo-memory configuration (add inline to your workflow's frontmatter):

```yaml
tools:
  repo-memory:
    branch-name: memory/(your-analysis-name)
    description: "Historical (analysis type) results"
    file-glob: ["memory/(your-analysis-name)/*.json", "memory/(your-analysis-name)/*.jsonl",
                "memory/(your-analysis-name)/*.csv", "memory/(your-analysis-name)/*.md"]
    max-file-size: 102400  # 100KB

Common jq Queries

# Count total PRs
jq 'length' /tmp/gh-aw/pr-data/copilot-prs.json

# PRs from last 7 days
jq '[.[] | select(.createdAt >= "'"$(date -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || date -v-7d '+%Y-%m-%dT%H:%M:%SZ')"'")]' /tmp/gh-aw/pr-data/copilot-prs.json

# Merged vs closed stats
jq 'group_by(.state) | map({state: .[0].state, count: length})' /tmp/gh-aw/pr-data/copilot-prs.json

**Usage Example**:

```yaml
imports:
  - shared/copilot-pr-analysis-base.md  # Replaces jqschema.md + reporting.md + copilot-pr-data-fetch.md

Impact

  • Workflows affected: 4 workflows
  • Lines saved: ~15–20 lines of repeated imports and tool config per workflow = ~60–80 lines total
  • Maintenance benefit: When copilot-pr-data-fetch.md is updated, all 4 analysis workflows automatically benefit through a single import change in copilot-pr-analysis-base.md; consistent tooling across all PR analysis workflows

Implementation Plan

  1. Create .github/workflows/shared/copilot-pr-analysis-base.md with bundled imports and prompt guidance
  2. Update copilot-pr-nlp-analysis.md to use the new shared component
  3. Update copilot-pr-prompt-analysis.md to use the new shared component
  4. Update copilot-agent-analysis.md to use the new shared component
  5. Update copilot-pr-merged-report.md to use the new shared component
  6. Run make recompile to regenerate all lock files
  7. Verify all workflows compile and run correctly

Related Analysis

This recommendation comes from the Workflow Skill Extractor analysis run on 2026-02-22.

See full analysis report in the linked discussion.

Generated by Workflow Skill Extractor

  • expires on Feb 24, 2026, 4:19 PM UTC

Comments on the Issue (you are @copilot in this section)

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor copilot PR analysis base setup into shared component Extract Copilot PR Analysis Base Setup into shared component Feb 23, 2026
@pelikhan pelikhan marked this pull request as ready for review February 23, 2026 01:30
Copilot AI review requested due to automatic review settings February 23, 2026 01:30
@pelikhan pelikhan merged commit 6c28d39 into main Feb 23, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/refactor-copilot-pr-analysis-setup branch February 23, 2026 01:30
Copy link
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

This PR extracts common Copilot PR analysis setup into a new shared component to eliminate duplication across four analysis workflows. The refactoring consolidates tools configuration (github, edit, bash) and shared imports (jqschema.md, reporting.md, copilot-pr-data-fetch.md) into a single reusable component.

Changes:

  • Created new shared/copilot-pr-analysis-base.md shared component bundling common tools and imports with usage guidance
  • Replaced duplicated imports and tool configurations in 4 workflows with single import of the new base component
  • Regenerated lock files via make recompile showing proper import expansion (158 workflows compile successfully)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/shared/copilot-pr-analysis-base.md New shared component providing tools (github, edit, bash), imports (jqschema, reporting, copilot-pr-data-fetch), and documentation for repo-memory configuration and common jq queries
.github/workflows/copilot-pr-prompt-analysis.md Replaced 3 imports and 3 tool entries with single base import; workflow-specific repo-memory config remains inline
.github/workflows/copilot-pr-nlp-analysis.md Replaced 3 imports and 3 tool entries with single base import; retains workflow-specific python-dataviz import
.github/workflows/copilot-pr-merged-report.md Replaced reporting.md import with base import (gains jqschema + copilot-pr-data-fetch); correctly retains github: false override and gh.md import
.github/workflows/copilot-agent-analysis.md Replaced 3 imports and specific bash command list with single base import using bash: ["*"] for simplified tool configuration
.github/workflows/copilot-pr-prompt-analysis.lock.yml Regenerated lock showing expanded imports (base + nested dependencies); updated frontmatter hash
.github/workflows/copilot-pr-nlp-analysis.lock.yml Regenerated lock with proper import expansion and step reordering (jqschema setup moved after python setup)
.github/workflows/copilot-pr-merged-report.lock.yml Regenerated lock with additional GitHub context variables, cache-memory integration, GitHub MCP server configuration, and new update_cache_memory job
.github/workflows/copilot-agent-analysis.lock.yml Regenerated lock showing simplified bash tool configuration (from 30+ specific commands to general "Bash" tool)

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

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.

[refactoring] Extract Copilot PR Analysis Base Setup into shared component

3 participants