一键导入
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use Symphony's generated typed Linear tools for tracker workflow actions. Provides Linear capability semantics and workpad rules.
Use Symphony's generated typed TAPD tools for tracker workflow actions. Provides TAPD capability semantics and workpad rules.
Investigate stuck runs and execution failures by tracing Symphony and Codex logs with issue/session identifiers; use when runs stall, retry repeatedly, or fail unexpectedly.
Land a PR by monitoring conflicts, resolving them, waiting for checks, and squash-merging when green; use when asked to land, merge, or shepherd a PR to completion.
Land a PR by monitoring conflicts, resolving them, waiting for checks, and squash-merging when green; use when asked to land, merge, or shepherd a PR to completion.
Write a feature spec or PRD from a problem statement or feature idea. Use when turning a vague idea or user request into a structured document, scoping a feature with goals and non-goals, defining success metrics and acceptance criteria, or breaking a big ask into a phased spec.
| 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 the
target repo.CNB_TOKEN is available for provider-backed PR operations.origin remote must already use CNB HTTPS
transport. Push auth is still Git-level auth and should use username
cnb plus the token through the existing credential flow or remote config.repo.provider.options.required_pr_label is explicitly configured.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 through the bundled repo helper for repo-core covered facts.
Run the repo-defined validation gate from the current repo root before pushing.
Push branch to origin with upstream tracking if needed, using whatever
remote URL is already configured, then verify the published head matches the
local head.
If push is not clean/rejected:
pull
skill to merge the repo's current base branch, resolve conflicts, and
rerun validation.--force-with-lease only when history was rewritten.Ensure a PR exists for the branch:
If repo.provider.options.required_pr_label is configured:
"$provider_cmd" pr-add-label "<label>" after the PR exists.When the target repo provides .github/pull_request_template.md, write/update
the PR body explicitly from that template:
<!-- ... -->).If the target repo ships a local PR-body validator, run it and fix all reported issues before handing off.
Reply with the PR URL from the bundled repo-provider helper.
# Resolve the bundled helpers from the runtime automation directory.
automation_dir="${SYMPHONY_WORKSPACE_AUTOMATION_DIR:?SYMPHONY_WORKSPACE_AUTOMATION_DIR is required}"
repo_cmd="$automation_dir/bin/repo"
provider_cmd="$automation_dir/bin/repo-provider"
# Identify branch through repo-core when available.
branch=$("$repo_cmd" current-branch)
# Minimal validation gate: run the current repo's documented checks from this
# repo root before pushing. Examples:
# make all
# npm test
# cargo test
# Initial push: respect the current origin remote. In CNB mode that remote
# should already be HTTPS-based and authenticated through the existing Git
# credential flow; do not rewrite it here as a workaround.
"$repo_cmd" push "$branch" --set-upstream
# If that failed because the remote moved, use the pull skill. After
# pull-skill resolution and re-validation, retry the normal push:
"$repo_cmd" push "$branch" --set-upstream
# 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:
"$repo_cmd" push "$branch" --force-with-lease
# After whichever push succeeds, confirm the configured remote sees the same
# branch head that was validated locally.
local_sha=$("$repo_cmd" head-sha)
published_sha=$("$repo_cmd" published-head-sha "$branch")
if [ "$published_sha" != "$local_sha" ]; then
echo "Published head $published_sha does not match local HEAD $local_sha" >&2
exit 1
fi
# Ensure a PR or equivalent change proposal exists. The provider helper owns
# provider-native behavior for the configured repo provider.
pr_state=$("$provider_cmd" 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 with the repo helper, then create a replacement 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>"
if [ -z "$pr_state" ]; then
"$provider_cmd" pr-create --title "$pr_title"
else
# Reconsider title on every branch update; edit if scope shifted.
"$provider_cmd" pr-edit --title "$pr_title"
fi
# Optional workflow-level label enforcement when configured:
# required_pr_label="<configured repo.provider.options.required_pr_label or empty>"
# if [ -n "$required_pr_label" ] && [ "$("$provider_cmd" current-kind | tr -d '\n')" = "github" ]; then
# "$provider_cmd" pr-add-label "$required_pr_label"
# fi
# Write/edit PR body to match .github/pull_request_template.md before validation.
# Example workflow:
# 1) open the template and draft body content for this PR
# 2) "$provider_cmd" pr-edit --body-file /tmp/pr_body.md
# 3) for branch updates, re-check that title/body still match current diff
tmp_pr_body=$(mktemp)
"$provider_cmd" pr-view --json body -q .body > "$tmp_pr_body"
# If the target repo ships a local PR-body validator, run it here.
rm -f "$tmp_pr_body"
# Show PR URL for the reply
"$provider_cmd" 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.