Commit Graph

6 Commits

Author SHA1 Message Date
Trevin Chow 3ad1f3ec64 fix: add gh repo view fallback for default branch detection
When origin/HEAD is unavailable (no remote, ref unset), fall back to
gh repo view to query the GitHub default branch before hard-coding
main. Covers repos using develop/trunk as their default.

Addresses PR review feedback (#386)
2026-03-25 21:36:55 -07:00
Trevin Chow 28c3f78ae7 fix: remove sed pipes that mask rev-parse/symbolic-ref failures
Piping into sed returns exit 0 even when the upstream git command
fails, so the "fall back to main" path never triggers. The agent
reads stdout/stderr directly and can strip the origin/ prefix and
detect failures itself.

Addresses PR review feedback (#386)
2026-03-25 21:32:22 -07:00
Trevin Chow d5ac329592 fix: strip origin/ prefix inline with sed pipe
Use `| sed 's@^origin/@@'` directly in the command instead of
instructing the agent to strip the prefix in a separate step.
2026-03-25 21:26:38 -07:00
Trevin Chow 88bfd6e2dc fix: resolve repo default branch before branch-protection guard
Add `git rev-parse --abbrev-ref origin/HEAD` to Step 1 so the guard
works for repos whose default branch is not main or master (e.g.
develop, trunk). Falls back to main if the remote HEAD is unset.

Addresses PR review feedback (#386)
2026-03-25 21:19:53 -07:00
Trevin Chow 561b289cea feat: add default-branch guard to git-commit skill
The git-commit skill collected the current branch name but never
checked whether it was main/master. Add a guard that warns the user
and offers to create a feature branch before committing, matching the
protection already present in git-commit-push-pr.
2026-03-25 21:14:57 -07:00
Trevin Chow fe08af2b41 feat: add git commit and branch helper skills (#378) 2026-03-25 14:53:39 -07:00