Skip to content

fix(coverage-floor): pass --head/--base to gh pr create after PAT push#57

Merged
topcoder1 merged 1 commit into
mainfrom
ci/coverage-floor-gh-pr-create-head-flag
May 13, 2026
Merged

fix(coverage-floor): pass --head/--base to gh pr create after PAT push#57
topcoder1 merged 1 commit into
mainfrom
ci/coverage-floor-gh-pr-create-head-flag

Conversation

@topcoder1

Copy link
Copy Markdown
Owner

Bug

The PAT-based seed flow (#56) pushes the seed branch via PAT-embedded URL:

git push -u "$PUSH_URL" "$BRANCH"

This sets upstream tracking to the PAT URL, not origin. gh pr create can't autodetect head from that and errors:

aborted: you must first push the current branch to a remote, or use the --head flag

Caught on whois-api-llc/wxa-graph during the first end-to-end test of the new seed flow. Branch was pushed (no error); only the gh pr create step failed.

Fix

Pass --head $BRANCH and --base $GITHUB_REF_NAME explicitly.

Manual recovery already done

PR opened manually on wxa-graph (#88, branch already-pushed). Future installs use this fix.

Auto-merge rationale

ci-workflows policy — manual click after Claude Review approves.

🤖 Generated with Claude Code

The previous PAT-based push sets the upstream tracking to the
PAT-embedded URL (not `origin`), so `gh pr create` can't autodetect
the head branch. Errored on wxa-graph install:

> aborted: you must first push the current branch to a remote,
> or use the --head flag

Fix: pass --head $BRANCH and --base $GITHUB_REF_NAME explicitly.

Caught on whois-api-llc/wxa-graph during the first end-to-end test of
the PAT-based seed flow. Branch was pushed successfully; just the PR
open step failed. Manually recovered (opened PR #88 with the already-
pushed branch). Future installs use this fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

Coverage Floor — mode: enforce

metric value
measured 100.0%
floor (current) 99.0%
target 100.0%
last bumped 2026-05-12

@claude

claude Bot commented May 13, 2026

Copy link
Copy Markdown

No issues found. The explicit --head/--base flags correctly fix the PAT-upstream autodetect failure; GITHUB_REF_NAME is reliably main in this step's trigger condition, and pipefail still propagates gh failures through the tail -1 pipe.

@topcoder1
topcoder1 merged commit 945a0a5 into main May 13, 2026
11 checks passed
@topcoder1
topcoder1 deleted the ci/coverage-floor-gh-pr-create-head-flag branch May 13, 2026 01:36
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.

1 participant