Skip to content

Remove git fetch */origin when fixed upstream #225

Open

Description

Activity

  1. github-actions commented on Feb 20, 2026

    @github-actions
    Contributor

    TL;DR: we should not remove the git fetch ... refs/remotes/origin/* workaround yet, because the upstream bug is still open (github/gh-aw#16925); keep this issue as a tracker and remove it right after upgrading to a gh-aw version that contains the fix.

    Recommendation

    Keep the current workaround in place for now, and gate removal on two conditions: (1) upstream issue github/gh-aw#16925 is closed with a released fix, and (2) this repo upgrades GH_AW_VERSION to that release and validates PR assistant push behavior.

    Findings
    • The workaround is currently active in the reusable workflow shim:
      • .github/workflows/gh-aw-mention-in-pr.md:68-76 (Ensure origin refs for PR patch generation with git fetch --no-tags --prune origin '+refs/heads/*:refs/remotes/origin/*').
    • It is compiled into the lock workflow used by consumers:
      • .github/workflows/gh-aw-mention-in-pr.lock.yml:666-667.
    • This mitigation was introduced by merged PR #220 as a fix path for issue #206.
    • Upstream root-cause issue remains open:
      • github/gh-aw#16925 state is open.
    • Current gh-aw version pin in this repo is:
      • Makefile:4 (GH_AW_VERSION := v0.45.1), compiled via Makefile:126-128.
    Verification

    I verified current behavior and repo health with existing commands:

    $ make lint-workflows
    Setting up actionlint...
    Downloading actionlint v1.7.10...
    ✓ actionlint installed to bin/actionlint
    Validating GitHub Actions workflow files...
    Checking claude-workflows/issue-triage/ro/example.yml...
    ...
    Checking claude-workflows/build-failure-github-actions/rwx/example.yml...
    (exit code 0)
    

    And confirmed the workaround locations:

    $ rg -n "Ensure origin refs for PR patch generation|refs/remotes/origin/\*" .github/workflows/gh-aw-mention-in-pr*
    .github/workflows/gh-aw-mention-in-pr.md:68:  - name: Ensure origin refs for PR patch generation
    .github/workflows/gh-aw-mention-in-pr.md:76:      git fetch --no-tags --prune origin '+refs/heads/*:refs/remotes/origin/*'
    .github/workflows/gh-aw-mention-in-pr.lock.yml:666:        name: Ensure origin refs for PR patch generation
    .github/workflows/gh-aw-mention-in-pr.lock.yml:667:        run: "...git fetch --no-tags --prune origin '+refs/heads/*:refs/remotes/origin/*'..."
    
    Detailed Action Plan
    1. Monitor github/gh-aw#16925 and wait for closure + release notes indicating the push_to_pull_request_branch patch generation fix.
    2. Update Makefile:4 (GH_AW_VERSION) to the fixed upstream version.
    3. Remove the temporary fetch step from .github/workflows/gh-aw-mention-in-pr.md:68-76.
    4. Recompile workflows so lock files match source:
      • make compile
    5. Validate workflows:
      • make lint-workflows (or make lint)
    6. Run an end-to-end smoke test on a same-repo PR using /ai in an issue_comment:
      • request a tiny code edit,
      • confirm push succeeds without reapplying old commits,
      • confirm no regression vs current behavior.
    Related Items
    Type Link Relevance
    Issue #225 This tracking issue
    Issue #206 Original failure report in this repo
    PR #220 Added the temporary origin-fetch workaround
    Upstream issue github/gh-aw#16925 Upstream bug that blocks removal
    File .github/workflows/gh-aw-mention-in-pr.md:68-76 Workaround source to remove later
    File .github/workflows/gh-aw-mention-in-pr.lock.yml:666-667 Compiled workflow currently containing workaround
    File Makefile:4,126-128 gh-aw version pin and compile flow

    What is this? | From workflow: Issue Triage Agent

    Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. for issue #225

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions