refactor(skills): apply progressive disclosure to gitea skill
Split gitea skill into main file and reference documentation. Main SKILL.md now focuses on core commands (154 lines, down from 201), with setup/auth and CI/Actions moved to reference files. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -7,46 +7,15 @@ user-invocable: false
|
||||
|
||||
# Gitea CLI (tea)
|
||||
|
||||
Command-line interface for interacting with Gitea repositories.
|
||||
Command-line interface for Gitea repositories. Use `tea` for issue/PR management in Gitea instances.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
brew install tea
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
The `tea` CLI authenticates via `tea logins add`. Credentials are stored locally by tea.
|
||||
|
||||
```bash
|
||||
tea logins add # Interactive login
|
||||
tea logins add --url <url> --token <token> --name <name> # Non-interactive
|
||||
tea logins list # Show configured logins
|
||||
tea logins default <name> # Set default login
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Config is stored at `~/Library/Application Support/tea/config.yml` (macOS).
|
||||
|
||||
To avoid needing `--login` on every command, set defaults:
|
||||
|
||||
```yaml
|
||||
preferences:
|
||||
editor: false
|
||||
flag_defaults:
|
||||
remote: origin
|
||||
login: git.flowmade.one
|
||||
```
|
||||
**Setup required?** See [reference/setup.md](reference/setup.md) for installation and authentication.
|
||||
|
||||
## Repository Detection
|
||||
|
||||
`tea` automatically detects the repository from git remotes when run inside a git repository. Use `--remote <name>` to specify which remote to use.
|
||||
|
||||
## Common Commands
|
||||
|
||||
### Issues
|
||||
## Issues
|
||||
|
||||
```bash
|
||||
# List issues
|
||||
@@ -81,7 +50,7 @@ tea issues deps add 5 owner/repo#3 # Cross-repo dependency
|
||||
tea issues deps remove <issue> <blocker> # Remove a dependency
|
||||
```
|
||||
|
||||
### Pull Requests
|
||||
## Pull Requests
|
||||
|
||||
```bash
|
||||
# List PRs
|
||||
@@ -121,15 +90,7 @@ tea pulls merge <number> --style rebase-merge # Rebase then merge
|
||||
tea pulls clean <number> # Delete local & remote branch
|
||||
```
|
||||
|
||||
### Repository
|
||||
|
||||
```bash
|
||||
tea repos # List repos
|
||||
tea repos <owner>/<repo> # Repository info
|
||||
tea clone <owner>/<repo> # Clone repository
|
||||
```
|
||||
|
||||
### Comments
|
||||
## Comments
|
||||
|
||||
```bash
|
||||
# Add comment to issue or PR
|
||||
@@ -145,7 +106,15 @@ tea comment 3 "## Review Summary
|
||||
|
||||
> **Warning**: Do not use heredoc syntax `$(cat <<'EOF'...EOF)` with `tea comment` - it causes the command to be backgrounded and fail silently.
|
||||
|
||||
### Notifications
|
||||
## Repository
|
||||
|
||||
```bash
|
||||
tea repos # List repos
|
||||
tea repos <owner>/<repo> # Repository info
|
||||
tea clone <owner>/<repo> # Clone repository
|
||||
```
|
||||
|
||||
## Notifications
|
||||
|
||||
```bash
|
||||
tea notifications # List notifications
|
||||
@@ -179,22 +148,6 @@ tea issues -r owner/repo # Specify repo directly
|
||||
- Use `--remote gitea` when you have multiple remotes (e.g., origin + gitea)
|
||||
- The `tea pulls checkout` command is handy for reviewing PRs locally
|
||||
|
||||
## Actions / CI
|
||||
## Advanced Topics
|
||||
|
||||
```bash
|
||||
# List workflow runs
|
||||
tea actions runs # List all workflow runs
|
||||
tea actions runs -o json # JSON output for parsing
|
||||
|
||||
# List jobs for a run
|
||||
tea actions jobs <run-id> # Show jobs for a specific run
|
||||
tea actions jobs <run-id> -o json # JSON output
|
||||
|
||||
# Get job logs
|
||||
tea actions logs <job-id> # Display logs for a job
|
||||
|
||||
# Full workflow: find failed job logs
|
||||
tea actions runs # Find the run ID
|
||||
tea actions jobs <run-id> # Find the job ID
|
||||
tea actions logs <job-id> # View the logs
|
||||
```
|
||||
- **CI/Actions debugging**: See [reference/actions-ci.md](reference/actions-ci.md)
|
||||
|
||||
45
skills/gitea/reference/actions-ci.md
Normal file
45
skills/gitea/reference/actions-ci.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# Gitea Actions / CI
|
||||
|
||||
Commands for debugging CI/Actions workflow failures in Gitea.
|
||||
|
||||
## Workflow Runs
|
||||
|
||||
```bash
|
||||
# List workflow runs
|
||||
tea actions runs # List all workflow runs
|
||||
tea actions runs -o json # JSON output for parsing
|
||||
```
|
||||
|
||||
## Jobs
|
||||
|
||||
```bash
|
||||
# List jobs for a run
|
||||
tea actions jobs <run-id> # Show jobs for a specific run
|
||||
tea actions jobs <run-id> -o json # JSON output
|
||||
```
|
||||
|
||||
## Logs
|
||||
|
||||
```bash
|
||||
# Get job logs
|
||||
tea actions logs <job-id> # Display logs for a job
|
||||
```
|
||||
|
||||
## Full Workflow: Find Failed Job Logs
|
||||
|
||||
```bash
|
||||
# 1. Find the run ID
|
||||
tea actions runs
|
||||
|
||||
# 2. Find the job ID from that run
|
||||
tea actions jobs <run-id>
|
||||
|
||||
# 3. View the logs
|
||||
tea actions logs <job-id>
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
- Use `-o json` with runs/jobs for programmatic parsing
|
||||
- Run IDs and Job IDs are shown in the output of the respective commands
|
||||
- Logs are displayed directly to stdout (can pipe to `grep` or save to file)
|
||||
49
skills/gitea/reference/setup.md
Normal file
49
skills/gitea/reference/setup.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Gitea CLI Setup
|
||||
|
||||
One-time installation and authentication setup for `tea` CLI.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
brew install tea
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
The `tea` CLI authenticates via `tea logins add`. Credentials are stored locally by tea.
|
||||
|
||||
```bash
|
||||
tea logins add # Interactive login
|
||||
tea logins add --url <url> --token <token> --name <name> # Non-interactive
|
||||
tea logins list # Show configured logins
|
||||
tea logins default <name> # Set default login
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Config is stored at `~/Library/Application Support/tea/config.yml` (macOS).
|
||||
|
||||
To avoid needing `--login` on every command, set defaults:
|
||||
|
||||
```yaml
|
||||
preferences:
|
||||
editor: false
|
||||
flag_defaults:
|
||||
remote: origin
|
||||
login: git.flowmade.one
|
||||
```
|
||||
|
||||
## Example: Flowmade One Setup
|
||||
|
||||
```bash
|
||||
# Install
|
||||
brew install tea
|
||||
|
||||
# Add login (get token from https://git.flowmade.one/user/settings/applications)
|
||||
tea logins add --name flowmade --url https://git.flowmade.one --token <your-token>
|
||||
|
||||
# Set as default
|
||||
tea logins default flowmade
|
||||
```
|
||||
|
||||
Now `tea` commands will automatically use the flowmade login when run in a repository with a git.flowmade.one remote.
|
||||
Reference in New Issue
Block a user