3.2 KiB
3.2 KiB
name, description
| name | description |
|---|---|
| gitea-cli | Use this skill whenever you need to interact with Gitea: creating pull requests, listing issues, managing branches, checking PR status, or any other Gitea repo operations in this project. The CLI tool is `tea`, already configured with login `allanjsouza` pointing to `gitea.allanjsouza.cloud`. Use this skill any time the user mentions PRs, pull requests, issues, Gitea, or asks you to open/create/list anything on the remote repo — even if they don't say "tea" explicitly. |
Gitea CLI Skill (tea)
Gitea instance: gitea.allanjsouza.cloud
Login configured: allanjsouza
Repo remote: ssh://git@gitea.allanjsouza.cloud:2222/allanjsouza/ctgwf.git
Critical: No-TTY Mode
tea tries to open an interactive TTY for some operations. This always fails in
Claude Code. Always pass all required fields as flags — never rely on interactive
prompts. When in doubt, check tea <cmd> -h and supply every required flag
explicitly.
Creating a Pull Request
tea pulls create \
--title "feat: short description" \
--description "$(cat <<'EOF'
## Summary
- bullet 1
- bullet 2
## Test plan
- [ ] item
EOF
)" \
--base main \
--head <current-branch>
Key flags:
--base— target branch (usuallymain)--head— source branch (current feature branch; defaults to current if omitted)--title— PR title (follow repo commit style:type: description)--description— PR body (use a heredoc to avoid quoting issues)--assignees allanjsouza— optionally assign to user--labels "label1,label2"— optionally add labels
Always verify the current branch before creating a PR:
git branch --show-current
Push the branch first if not yet on remote:
git push -u origin <branch>
Listing PRs
tea pulls list # open PRs
tea pulls list --state all # all PRs
tea pulls list --output json # JSON output
Listing Issues
tea issues list # open issues
tea issues list --state all
Other Useful Commands
tea pulls list --fields index,title,state,author,updated
tea repo # show repo info
tea branches list # list branches
tea comment <issue-index> --body "…" # add comment
Advanced API Operations (Review)
tea api handles the construction of a JSON body when using -f (string) and -F (typed) flags. It also automatically replaces {owner} and {repo} placeholders with values from the current repository context.
Fetch PR Diff
tea api /repos/<owner>/<repo>/pulls/<index>.diff
Submit a Review with Comments
tea api -X POST /repos/<owner>/<repo>/pulls/<index>/reviews \
-f "body=Automated Review" \
-f "event=COMMENT" \
-F "comments=@-" <<'EOF'
[
{
"path": "app/models/user.rb",
"body": "Suggestion content",
"new_position": 42,
"old_position": 0
}
]
EOF
Workflow for PR Creation
- Confirm all changes are committed:
git status - Push branch:
git push -u origin <branch> - Build PR title from commit history:
git log main.. --oneline - Create PR with
tea pulls create(all flags explicit, no prompts) - Return the PR URL from the
teaoutput