diff --git a/.opencode/skills/gitea-tea/SKILL.md b/.opencode/skills/gitea-tea/SKILL.md index 289a713..1ef9954 100644 --- a/.opencode/skills/gitea-tea/SKILL.md +++ b/.opencode/skills/gitea-tea/SKILL.md @@ -1,6 +1,6 @@ --- name: gitea-tea -description: Use tea CLI to create, manage, and checkout Gitea pull requests. Use this when opening a PR, managing PRs, or checking out PRs on the gitea remote (gitea.story-basking.ts.net). +description: Use tea CLI to create, manage, and checkout Gitea pull requests. Use this when opening a PR, managing PRs, or checking out PRs on the Gitea remote (gitea.story-basking.ts.net). --- # Gitea Tea CLI Skill @@ -10,27 +10,36 @@ This skill covers using `tea` (Gitea's official CLI) for pull request workflows ## When to Use This Skill Use this skill when you need to: -- Create a PR from a working branch to master on the gitea remote +- Create a PR from a working branch to master on the Gitea remote - Open, list, or view PRs - Checkout a PR locally for review or iteration - Manage PR state (close, reopen, merge) ## Project Setup -The gitea remote is `gitea.story-basking.ts.net` with repo slug `notid/integreat`. The default push remote is **gitea**, NOT origin and NOT deploy. +The git remote is `origin` pointing to `git@gitea:notid/ai-game-2.git`. The repo slug is `notid/ai-game-2`. In this project's environment: - Gitea login is pre-configured for `gitea.story-basking.ts.net` -- Repo slug: `notid/integreat` +- Repo slug: `notid/ai-game-2` - Target branch for PRs: `master` -- The git remote named `gitea` points to this instance +- The git remote named `origin` points to this instance + +## Key Flags + +All tea subcommands support these flags for repo and auth context: +- `-r notid/ai-game-2` - Override repo slug (required when auto-discovery fails, e.g. in worktrees) +- `-R origin` - Discover Gitea login from a specific git remote +- `-l ` - Use a different Gitea login + +In practice, you usually need just `-r notid/ai-game-2` on the subcommand you're running. ## Creating a PR -Use `tea pulls create` to open a PR from the current branch to master. Always specify `-r notid/integreat -b master`: +Use `tea pulls create` to open a PR from the current branch to master: ```bash -tea pulls create -r notid/integreat -b master --title "Title" --description "Body" +tea pulls create -r notid/ai-game-2 -b master -t "Title" -d "Body" ``` Common flags: @@ -43,7 +52,7 @@ Common flags: **Writing a multiline description:** ```bash -tea pulls create -r notid/integreat -b master \ +tea pulls create -r notid/ai-game-2 -b master \ -t "feat: add feature" \ -d "$(cat <<'EOF' ## Summary @@ -58,22 +67,22 @@ Or write the body to a temp file first and reference it. ## Listing PRs ```bash -tea pulls list -r notid/integreat # List open PRs -tea pulls list -r notid/integreat --state all # All PRs -tea pulls list -r notid/integreat --limit 10 -o simple # Limit output, simple format +tea pulls list -r notid/ai-game-2 # List open PRs +tea pulls list -r notid/ai-game-2 --state all # All PRs +tea pulls list -r notid/ai-game-2 --limit 10 -o simple # Limit output, simple format ``` ## Opening a PR in Browser ```bash -tea open pr -r notid/integreat -tea open pr create -r notid/integreat # Open web UI to create a PR +tea open pr -r notid/ai-game-2 +tea open pr create -r notid/ai-game-2 # Open web UI to create a PR ``` ## Checking Out a PR Locally ```bash -tea pulls checkout -r notid/integreat +tea pulls checkout -r notid/ai-game-2 ``` This fetches and checks out the PR branch locally. @@ -82,46 +91,61 @@ This fetches and checks out the PR branch locally. **Close a PR:** ```bash -tea pulls close -r notid/integreat --confirm +tea pulls close -r notid/ai-game-2 --confirm ``` **Reopen a closed PR:** ```bash -tea pulls reopen -r notid/integreat --confirm +tea pulls reopen -r notid/ai-game-2 --confirm ``` **Merge a PR:** ```bash -tea pulls merge -r notid/integreat --confirm +tea pulls merge -r notid/ai-game-2 --confirm ``` **Edit a PR (title, description, etc.):** ```bash -tea pulls edit -r notid/integreat --title "New title" --description "New body" +tea pulls edit -r notid/ai-game-2 -t "New title" -d "New body" ``` ## Full PR Creation Workflow -1. Ensure the branch is pushed to gitea: +1. Commit all changes on your branch: ```bash - git push gitea + git add . && git commit -m "describe the change" ``` -2. Create the PR with tea: +2. Push the branch to origin: ```bash - tea pulls create -r notid/integreat -b master \ - --title "feat: description of change" \ - --description "Detailed PR body here" + git push origin ``` -3. Open the PR in browser to verify: +3. Create the PR with tea: ```bash - tea open pr -r notid/integreat + tea pulls create -r notid/ai-game-2 -b master \ + -t "feat: description of change" \ + -d "Detailed PR body here" ``` +4. Open the PR in browser to verify: + ```bash + tea open pr -r notid/ai-game-2 + ``` + +## Worktree Gotcha + +When running from a git worktree, tea may fail to auto-discover the repo. Always pass `-r notid/ai-game-2` explicitly in that case: + +```bash +tea pulls list -r notid/ai-game-2 # Works in worktrees +tea pulls create -r notid/ai-game-2 ... # Works in worktrees +``` + ## Tips -- Always use `-r notid/integreat` to specify the repo explicitly +- Always use `-r notid/ai-game-2` to specify the repo explicitly, especially in worktrees - Use `-b master` to set the target branch (default may differ) - The `--confirm` flag is required for destructive actions (close, merge) - Use `-o simple`, `-o json`, `-o table`, etc. to control output format +- `tea whoami` verifies your authentication before running PR commands