dart-backport-pr
GitHub用于将已合并至 main 的 PR 或提交反向移植到发布分支。验证源状态,检查重复变更,处理 AI 工作流兼容性,执行 cherry-pick、冲突解决及 CI 检查,并生成 Changelog 决策后创建 PR。
触发场景
安装
npx skills add dartsim/dart --skill dart-backport-pr -g -y
SKILL.md
Frontmatter
{
"name": "dart-backport-pr",
"description": "DART Backport PR: backport a merged main PR to a release branch"
}
dart-backport-pr
Use this skill in Codex to run the DART dart-backport-pr workflow. The editable
workflow source currently lives in .claude/commands/, and this generated
Codex skill is a generated Codex adapter entrypoint.
Invocation
- Claude Code/OpenCode:
/dart-backport-pr <arguments> - Codex:
$dart-backport-pr <arguments>
Treat the text after the skill name as $ARGUMENTS. When the workflow
references $1, $2, etc., map those to the positional values supplied by the
user.
Command Body
Backport PR or commits: $ARGUMENTS
Required Reading
@AGENTS.md @docs/onboarding/contributing.md @docs/onboarding/release-management.md @docs/onboarding/changelog.md
Workflow
- Verify the source PR or commit is merged to
main:gh pr view <SOURCE_PR> --json state,mergedAt,baseRefName,mergeCommit - Check whether an equivalent change already exists on the release branch:
git fetch origin <RELEASE_BRANCH> main git cherry -v --abbrev=40 origin/<RELEASE_BRANCH> origin/main | grep <COMMIT_HASH> - For AI-infra or workflow-doc backports, compare the release branch capability
inventory and adapter directories against
main. If the release branch has a smaller workflow surface, adapt to the release branch instead of importing main-only workflows. - Create a release branch from the release target:
git checkout -B backport/<SOURCE_PR>-to-<RELEASE_BRANCH> origin/<RELEASE_BRANCH> - Cherry-pick with provenance:
git cherry-pick -x <COMMIT_HASH>. - Resolve conflicts minimally; stop and ask if conflicts are broad or change behavior.
- Run the
dart-changelogroutine for the release-target decision before opening the backport PR. - Run
pixi run lintand the smallest relevant release-branch checks. - Ask for explicit maintainer/user approval before pushing or opening the PR. After approval, open the PR against the release branch with milestone matching that release branch and use the PR template.
Output
- Backport PR URL
- Source PR/commit
- Conflicts resolved, if any
- Changelog decision
- Checks run and CI status
版本历史
-
51b2d25
当前 2026-07-11 18:25
新增对 AI 基础设施或工作流文档反向移植时的发布分支能力库存与适配器目录对比逻辑;澄清 AI 工作流术语。
- e0d13fd 2026-07-05 10:37


