Skip to content

Extract shared gh-cli-proxy.md component to deduplicate cli-proxy + gh-proxy pairing - #54147

Draft
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/refactoring-extract-gh-cli-proxy
Draft

Extract shared gh-cli-proxy.md component to deduplicate cli-proxy + gh-proxy pairing#54147
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/refactoring-extract-gh-cli-proxy

Conversation

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

135 workflows independently declared tools.cli-proxy: true alongside tools.github.mode: gh-proxy, duplicating this pairing across hundreds of lines and risking the two settings drifting apart.

Shared component

  • Added .github/workflows/shared/gh-cli-proxy.md, bundling both settings:
    ---
    tools:
      cli-proxy: true
      github:
        mode: gh-proxy
    ---
  • Kept separate from shared/gh.md (which only sets github.mode: gh-proxy) so its 15 existing consumers are unaffected.

Migration

  • Replaced the inline cli-proxy: true / github.mode: gh-proxy pair in 135 workflows with:
    imports:
      - shared/gh-cli-proxy.md
  • Removed the github:/tools: blocks entirely where they had no other keys left after extraction; preserved other sibling keys (e.g. toolsets, min-integrity) where present.
  • Consolidated a handful of workflows that redundantly imported shared/gh.md while also duplicating the settings inline — these now import shared/gh-cli-proxy.md instead.

Verification

  • Recompiled all workflows; .lock.yml diffs show only manifest/import-list bookkeeping and the new prompt-injection entry for the shared component's body (mirroring shared/gh.md's existing behavior) — no functional changes to generated tool/MCP configuration.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — thanks for getting started on the gh-cli-proxy component extraction! Here are a few things to keep in mind as you move forward:

  • Add tests — Once you create or modify workflows that use the new shared/gh-cli-proxy.md component, add tests or validation to confirm the YAML compiles correctly and the .lock.yml diffs show no behavioral changes (as mentioned in the issue's migration plan step 4). This is critical for a refactoring.
  • Process note — Per CONTRIBUTING.md, traditional PRs from non-core team members should be discussed in issues first before implementation. Since you're an agentic workflow bot working under core team direction (via [refactoring] Extract shared gh-cli-proxy.md component (122 workflow duplicates) #54136), this is appropriate. Just ensure the broader team has signed off on the implementation plan.
  • Still in WIP — This PR has 0 commits currently. Once you've implemented the component and migrated workflows, update the PR title to remove [WIP] and add substantive changes.

The issue provides a clear migration plan; following steps 1–4 will set this PR up for a smooth review. Looking forward to seeing the implementation!

Generated by ✅ Contribution Check · auto · 51.8 AIC · ⌖ 5.57 AIC · ⊞ 9.2K ·

Copilot AI changed the title [WIP] Refactor to extract shared gh-cli-proxy component for workflows Extract shared gh-cli-proxy.md component to deduplicate cli-proxy + gh-proxy pairing Aug 20, 2026
Copilot AI requested a review from pelikhan August 20, 2026 05:08
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Category: chore | Risk: medium | Priority: low (score 36/100)
Score breakdown: impact 15 + urgency 6 + quality 15
Recommended action: defer
Large mechanical extraction touching 271 workflow files to share the gh-cli-proxy component. Draft, no reviews yet — revisit after undraft.

Generated by 🔧 PR Triage Agent · auto · 62.9 AIC · ⌖ 7.05 AIC · ⊞ 8.3K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactoring] Extract shared gh-cli-proxy.md component (122 workflow duplicates)

2 participants