About gitee-pr
gitee-pr is a script-based workflow for creating Gitee pull requests from a Git repository. It applies team rules to branch names, commit subjects, working-tree state, and Chinese PR content before pushing and creating the PR.
Key features
- 01Validate branch naming and commits
- 02Check working-tree state
- 03Enforce Chinese PR content template
- 04Push branches and create Gitee PRs
- 05Dry-run validation and body preview
Use cases
- 01Preparing a repository branch for a Gitee PR
- 02Checking commits against team conventions
- 03Previewing PR checks and generated content
- 04Auto-committing local changes before PR checks
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bioshaun/ tc-skills --skill gitee-prAfter installing, type/gitee-prin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
gitee-pr-rules.mdagents/openai.yamlscripts/create_gitee_pr.pyDetails
From the project READMEGitee PR
Use scripts/create_gitee_pr.py to execute a rules-first PR workflow.
Apply team rules from gitee-pr-rules.md before creating PR.
Rule Files
- Main rules:
gitee-pr-rules.md
Required Inputs
- Set Gitee token:
GITEE_TOKENor--token. - Ensure remote is a Gitee repo or provide
--repo owner/repo. - Run command inside a Git repository.
Workflow
- Resolve
headandbasebranches. - Enforce branch naming format:
member/verb-description. - Ensure working tree is clean before PR (or auto-commit when
--auto-commitis enabled). - Validate all commit subjects in
remote/base..headwith allowed prefixes:feat:fix:docs:refactor:style:test:chore:
- Warn (non-blocking) when multiple core files are changed.
- Enforce Chinese PR content: title and body must include Chinese text.
- Enforce PR body template sections and order:
## 改动了什么?## 为什么改动?## 测试结果?## 注意事项
- Push branch unless
--no-push. - Create PR via Gitee API and print PR URL.
Recommended Commands
export GITEE_TOKEN="<token>"
python3 scripts/create_gitee_pr.py \
--base main \
--title "修复:优化过滤逻辑"
# Auto-commit local changes before PR checks
python3 scripts/create_gitee_pr.py \
--auto-commit \
--commit-message "chore: prepare gitee pr changes" \
--base main
# Validate checks and preview generated PR body without API call
python3 scripts/create_gitee_pr.py --base main --dry-run --no-push
# Keep custom body (must follow required template sections)
python3 scripts/create_gitee_pr.py \
--base main \
--body "$(cat pr-body.md)"
Default PR Body Template
When --body is not provided, script generates:
## 改动了什么?
- <commit summaries>
## 为什么改动?
- 请补充本次改动的业务背景和目标。
## 测试结果?
- 已检查提交前工作区为干净状态。
- 请补充本地测试命令与结果。
## 注意事项
- 无
Merge Cleanup
After PR merge, clean branch:
git branch -d <branch-name>
git push origin --delete <branch-name>
Comments
Markdown supported