fix(gitea-tea skill): correct remote name and repo slug
The skill doc referenced wrong values: - Remote was 'gitea', should be 'origin' - Repo slug was 'notid/integreat', should be 'notid/ai-game-2' Also added worktree gotcha section and key flags documentation.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: gitea-tea
|
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
|
# 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
|
## When to Use This Skill
|
||||||
|
|
||||||
Use this skill when you need to:
|
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
|
- Open, list, or view PRs
|
||||||
- Checkout a PR locally for review or iteration
|
- Checkout a PR locally for review or iteration
|
||||||
- Manage PR state (close, reopen, merge)
|
- Manage PR state (close, reopen, merge)
|
||||||
|
|
||||||
## Project Setup
|
## 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:
|
In this project's environment:
|
||||||
- Gitea login is pre-configured for `gitea.story-basking.ts.net`
|
- 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`
|
- 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 <username>` - 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
|
## 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
|
```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:
|
Common flags:
|
||||||
@@ -43,7 +52,7 @@ Common flags:
|
|||||||
**Writing a multiline description:**
|
**Writing a multiline description:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tea pulls create -r notid/integreat -b master \
|
tea pulls create -r notid/ai-game-2 -b master \
|
||||||
-t "feat: add feature" \
|
-t "feat: add feature" \
|
||||||
-d "$(cat <<'EOF'
|
-d "$(cat <<'EOF'
|
||||||
## Summary
|
## Summary
|
||||||
@@ -58,22 +67,22 @@ Or write the body to a temp file first and reference it.
|
|||||||
## Listing PRs
|
## Listing PRs
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tea pulls list -r notid/integreat # List open PRs
|
tea pulls list -r notid/ai-game-2 # List open PRs
|
||||||
tea pulls list -r notid/integreat --state all # All PRs
|
tea pulls list -r notid/ai-game-2 --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 --limit 10 -o simple # Limit output, simple format
|
||||||
```
|
```
|
||||||
|
|
||||||
## Opening a PR in Browser
|
## Opening a PR in Browser
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tea open pr <number> -r notid/integreat
|
tea open pr <number> -r notid/ai-game-2
|
||||||
tea open pr create -r notid/integreat # Open web UI to create a PR
|
tea open pr create -r notid/ai-game-2 # Open web UI to create a PR
|
||||||
```
|
```
|
||||||
|
|
||||||
## Checking Out a PR Locally
|
## Checking Out a PR Locally
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tea pulls checkout <number> -r notid/integreat
|
tea pulls checkout <number> -r notid/ai-game-2
|
||||||
```
|
```
|
||||||
|
|
||||||
This fetches and checks out the PR branch locally.
|
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:**
|
**Close a PR:**
|
||||||
```bash
|
```bash
|
||||||
tea pulls close <number> -r notid/integreat --confirm
|
tea pulls close <number> -r notid/ai-game-2 --confirm
|
||||||
```
|
```
|
||||||
|
|
||||||
**Reopen a closed PR:**
|
**Reopen a closed PR:**
|
||||||
```bash
|
```bash
|
||||||
tea pulls reopen <number> -r notid/integreat --confirm
|
tea pulls reopen <number> -r notid/ai-game-2 --confirm
|
||||||
```
|
```
|
||||||
|
|
||||||
**Merge a PR:**
|
**Merge a PR:**
|
||||||
```bash
|
```bash
|
||||||
tea pulls merge <number> -r notid/integreat --confirm
|
tea pulls merge <number> -r notid/ai-game-2 --confirm
|
||||||
```
|
```
|
||||||
|
|
||||||
**Edit a PR (title, description, etc.):**
|
**Edit a PR (title, description, etc.):**
|
||||||
```bash
|
```bash
|
||||||
tea pulls edit <number> -r notid/integreat --title "New title" --description "New body"
|
tea pulls edit <number> -r notid/ai-game-2 -t "New title" -d "New body"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Full PR Creation Workflow
|
## Full PR Creation Workflow
|
||||||
|
|
||||||
1. Ensure the branch is pushed to gitea:
|
1. Commit all changes on your branch:
|
||||||
```bash
|
```bash
|
||||||
git push gitea <branch-name>
|
git add . && git commit -m "describe the change"
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create the PR with tea:
|
2. Push the branch to origin:
|
||||||
```bash
|
```bash
|
||||||
tea pulls create -r notid/integreat -b master \
|
git push origin <branch-name>
|
||||||
--title "feat: description of change" \
|
|
||||||
--description "Detailed PR body here"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Open the PR in browser to verify:
|
3. Create the PR with tea:
|
||||||
```bash
|
```bash
|
||||||
tea open pr <number> -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 <number> -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
|
## 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)
|
- Use `-b master` to set the target branch (default may differ)
|
||||||
- The `--confirm` flag is required for destructive actions (close, merge)
|
- The `--confirm` flag is required for destructive actions (close, merge)
|
||||||
- Use `-o simple`, `-o json`, `-o table`, etc. to control output format
|
- Use `-o simple`, `-o json`, `-o table`, etc. to control output format
|
||||||
|
- `tea whoami` verifies your authentication before running PR commands
|
||||||
|
|||||||
Reference in New Issue
Block a user