3 Commits

View File

@@ -67,9 +67,16 @@ Hard rule:
- `git branch --set-upstream-to=origin/<branch> <branch>` - `git branch --set-upstream-to=origin/<branch> <branch>`
- Create PR on Gitea: - Create PR on Gitea:
- `tea pr create --base main --head <branch> --title "<title>" --description "<body>"` - `tea pr create --base main --head <branch> --title "<title>" --description "<body>"`
- If PR body includes backticks (`` ` ``), slash commands, or markdown that can be shell-expanded, do not pass it directly in double quotes.
- Preferred safe flow:
- `cat > /tmp/pr_body.md <<'EOF'` ... `EOF`
- `tea pr create --base main --head <branch> --title "<title>" --description "$(cat /tmp/pr_body.md)"`
- If the body is malformed after creation, patch it with API:
- `tea api -X PATCH repos/{owner}/{repo}/pulls/<number> -F body=@/tmp/pr_body.md`
- Sync local main: - Sync local main:
- `git checkout main` - `git checkout main`
- `git pull --ff-only` - `git pull --ff-only`
- When user confirms the PR is merged, always run this sync immediately to keep local `main` up to date before any next task.
Safety: Safety:
- Do not commit or print tokens in logs/docs. - Do not commit or print tokens in logs/docs.