跳到正文
cccskills
免费在 GitHub 公开

push

Push current branch changes to origin and create or update the corresponding pull request for OpenASE; use when asked to push, publish updates, or create a pull request.

中文简介正在准备中。当前显示原文说明。

PacificStudio/openase星标 269(GitHub 269 + cccskills 0)
集成工具GitHub

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md4.5 KB
  • scripts/openase_ci_gate.sh4.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Push

Prerequisites

  • gh CLI is installed and available in PATH.
  • gh auth status succeeds for GitHub operations in this repo.
  • corepack pnpm is available for frontend validation.

Goals

  • Push the current branch to origin safely.
  • Create a PR if none exists for the branch, otherwise update the existing PR.
  • Keep PR metadata aligned with the actual total scope of the branch.
  • Run the same local validation gates that current CI expects before publishing.

Related Skills

  • pull: use this when push is rejected or the branch must be merged with the latest origin/main.
  • commit: use this when there are local changes that are intended to ship but are not committed yet.

Validation Gate

Use the repo-local helper script:

  • .codex/skills/push/scripts/openase_ci_gate.sh

That script mirrors .github/workflows/ci.yml instead of asking the agent to guess which checks are needed:

  • Always runs make openapi-check because CI always runs API contract checks.
  • Detects go_changed and web_changed using the same path rules as CI.
  • Runs frontend CI with make web-install and corepack pnpm --dir web run ci when web_changed=true.
  • Runs backend and Go lint checks with make check, make build, LINT_BASE_REV=<base> make lint, make lint-depguard, and make lint-architecture when go_changed=true.

If the branch scope is ambiguous, use the script anyway; it already biases toward the stricter CI-compatible outcome.

Steps

  1. Identify the current branch and inspect working tree state.
  2. If there are intended but uncommitted changes, use the commit skill first.
  3. Ensure origin/main is available locally:
    • git fetch --no-tags origin main
  4. Run the local CI gate for the current branch diff:
    • .codex/skills/push/scripts/openase_ci_gate.sh
    • Use --plan first if you want to inspect which jobs it will run.
  5. Push the branch to origin, setting upstream tracking if needed.
  6. If the push is rejected because the remote moved:
    • Run the pull skill to merge origin/main and/or remote branch updates.
    • Rerun .codex/skills/push/scripts/openase_ci_gate.sh.
    • Push again.
    • Use --force-with-lease only when local history was intentionally rewritten.
  7. If the push fails due to auth, permissions, branch protection, or workflow restrictions, stop and surface the exact error. Do not rewrite remotes or switch protocols as a workaround.
  8. Ensure a PR exists for the branch:
    • If no PR exists, create one.
    • If a PR exists and is open, update it.
    • If the branch is tied to a closed or merged PR, create a new branch and a new PR instead of reusing stale history.
  9. Write a clear PR title that describes the shipped outcome, not just the last commit.
  10. Write or refresh the PR body explicitly. OpenASE does not currently require a repository PR template, so include concrete sections such as:
  • Summary
  • Validation
  • Risks / follow-up
  1. Reply with the PR URL from gh pr view.

Commands

# Identify branch
branch=$(git branch --show-current)

# Sync base branch for deterministic validation scope
git fetch --no-tags origin main

# Preview and run the CI-compatible validation gate
.codex/skills/push/scripts/openase_ci_gate.sh --plan
.codex/skills/push/scripts/openase_ci_gate.sh

# Push branch
git push -u origin HEAD

# Only if history was intentionally rewritten
git push --force-with-lease origin HEAD

# Inspect PR state
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

# Create or update PR metadata
pr_title="<clear PR title for the total branch scope>"
tmp_pr_body=$(mktemp)
cat > "$tmp_pr_body" <<'EOF'
## Summary
- <what changed>

## Validation
- <commands run>

## Risks / Follow-up
- <risks or none>
EOF

if [ -z "$pr_state" ]; then
  gh pr create --title "$pr_title" --body-file "$tmp_pr_body"
else
  gh pr edit --title "$pr_title" --body-file "$tmp_pr_body"
fi

rm -f "$tmp_pr_body"
gh pr view --json url -q .url

Notes

  • Do not assume .github/pull_request_template.md exists in this repo.
  • Prefer complete, honest PR metadata over placeholder text.
  • Do not replace the helper script with ad hoc command guessing. If CI changes, update the script and this skill together.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Diagnose and strengthen a repository's harness layer: AGENTS.md rules, knowledge layout, architecture boundaries, lint and type gates, API and generated-client contracts, test scaffolding, structured logging, and technical-debt tracking. Use when Codex needs to audit drift-prone semantics that are repeated across code, docs, schemas, generated artifacts, frontend/backend boundaries, or CI, then design or implement guardrails with progressive disclosure and zero-tolerance contract checks.

中文简介正在准备中。当前显示原文说明。

PacificStudio/openase2692026年8月9日 更新

commit

免费

Create a well-formed git commit from current changes using session history for rationale and summary; use when asked to commit, prepare a commit message, or finalize staged work.

中文简介正在准备中。当前显示原文说明。

PacificStudio/openase2692026年8月9日 更新

commit

免费

Write concise Conventional Commit messages that match the actual scope of the change.

中文简介正在准备中。当前显示原文说明。

PacificStudio/openase2692026年8月9日 更新

create-pr

免费

Prepare a crisp pull request summary with scope, validation, and rollout notes.

中文简介正在准备中。当前显示原文说明。

PacificStudio/openase2692026年8月9日 更新

Clarify ambiguous requests with a focused, Socratic interview before planning or implementation.

中文简介正在准备中。当前显示原文说明。

PacificStudio/openase2692026年8月9日 更新

Create or update a branch-scoped Coolify review environment with one command, and delete it with one command. Use when a ticket must deploy a preview before human review, while keeping the workflow simple and fast.

中文简介正在准备中。当前显示原文说明。

PacificStudio/openase2692026年8月9日 更新

查看 PacificStudio 的全部技能

报告此技能的问题