Ship
Commit, push, and watch the CI pipeline.
Steps
-
Stage changes: Run
git status --porcelain. If there are unstaged/untracked changes, stage them (prefer specific files overgit add -A— never stage.envor credential files). -
Commit: If a message argument is provided, use it. Otherwise, generate a conventional commit message from the diff (
feat:,fix:,chore:,docs:,refactor:,test:). Use the repo’s recentgit log --oneline -10to match style. -
Push: Run
git push. If no upstream is set, usegit push -u origin HEAD. -
Watch CI: After push, run
gh run list --branch $(git branch --show-current) --limit 1 --json databaseId,status,conclusionin a loop (max 5 minutes, poll every 15s). Report the final status. -
On failure: If CI fails, run
gh run view <id> --log-failedand show the relevant error output so the user can decide next steps.
Rules
- Never commit files that look like secrets (.env, credentials.json, *.pem, *.key).
- Never force push.
- If there are no changes to commit, say so and stop.
- If CI isn’t set up (no workflows found), just push and report that there’s no CI to watch.