with one click
push
// Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request.
// Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | push |
| description | Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request. |
gh CLI is installed and available in PATH.gh auth status succeeds for GitHub operations in this repo.origin safely.pull: use this when push is rejected or sync is not clean (non-fast-forward,
merge conflict risk, or stale branch).Identify current branch and confirm remote state.
Run local validation (npm test, npm run build, npm run check:meta)
before pushing.
Push branch to origin with upstream tracking if needed, using whatever
remote URL is already configured.
If push is not clean/rejected:
pull
skill to merge origin/main, resolve conflicts, and rerun validation.--force-with-lease only when history was rewritten.Ensure a PR exists for the branch:
Write/update PR body with a clear structure:
Summary: what changed and why.Spec Alignment: relevant SPEC.md sections.Verification: exact commands run and outcomes.If a PR template exists in the target repo, follow it exactly. Otherwise use the structured body above and ensure governance checks pass.
Submit/update through the governed wrapper (mandatory):
npm run submit:pr-governed -- --mode create --title "<clear PR title written for this change>"npm run submit:pr-governed -- --mode editcheck:pr-governance -> check:meta -> gh pr create/edit --body-file <normalized-file>.If body/review text references output/playwright/*, replace the local path reference with the Linear issue evidence comment created by the linear-ui-evidence skill before wrapper submit.
Reply with the PR URL from gh pr view.
# Identify branch
branch=$(git branch --show-current)
# Validation gate
npm test
npm run build
npm run check:meta
# Initial push: respect the current origin remote.
git push -u origin HEAD
# If that failed because the remote moved, use the pull skill. After
# pull-skill resolution and re-validation, retry the normal push:
git push -u origin HEAD
# If the configured remote rejects the push for auth, permissions, or workflow
# restrictions, stop and surface the exact error.
# Only if history was rewritten locally:
git push --force-with-lease origin HEAD
# Ensure a PR exists (create only if missing)
pr_state=$(gh pr view --json state -q .state 2>/dev/null || true)
if [ "$pr_state" = "MERGED" ] || [ "$pr_state" = "CLOSED" ]; then
echo "Current branch is tied to a closed PR; create a new branch + PR." >&2
exit 1
fi
# Write a clear, human-friendly title that summarizes the shipped change.
pr_title="<clear PR title written for this change>"
# Write/edit PR body to include Summary, Spec Alignment, and Verification.
# If this repo has a PR template, follow it; otherwise keep the above sections.
# Ensure governance checks are green before finalizing push/PR.
cat > .git/.symphony-pr-body.md <<'MD'
<full markdown PR body>
MD
if [ -z "$pr_state" ]; then
npm run submit:pr-governed -- --mode create --title "$pr_title"
else
# Reconsider title on every branch update; edit if scope shifted.
npm run submit:pr-governed -- --mode edit
fi
# Show PR URL for the reply
gh pr view --json url -q .url
--force; only use --force-with-lease as the last resort.pull skill for non-fast-forward or stale-branch issues.