Auto-commit: 2026-05-10 12:34
This commit is contained in:
56
skills/gitea-issue-resolver/SKILL.md
Normal file
56
skills/gitea-issue-resolver/SKILL.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
name: gitea-issue-resolver
|
||||
description: Resolve open Gitea issues by creating feature branches, implementing fixes, and committing. Use when checking or working on issues in Martin's Gitea repos (git.home.kies-media.de). Triggers on mentions of "issues", "Gitea issues", or when checking repos for open issues.
|
||||
---
|
||||
|
||||
# Gitea Issue Resolver
|
||||
|
||||
## Authentication
|
||||
|
||||
Use git credentials from `~/.git-credentials` for API calls:
|
||||
```bash
|
||||
GIT_CREDS=$(grep git.home.kies-media.de ~/.git-credentials | head -1)
|
||||
GIT_USER=$(echo "$GIT_CREDS" | sed -n 's|.*://\([^:]*\):.*|\1|p')
|
||||
GIT_PASS=$(echo "$GIT_CREDS" | sed -n 's|.*://[^:]*:\([^@]*\)@.*|\1|p')
|
||||
```
|
||||
|
||||
For API calls use `-u "$GIT_USER:$GIT_PASS"`. If Basic Auth fails, ask Martin for a Gitea API token.
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. Check for Open Issues
|
||||
|
||||
```bash
|
||||
curl -s "https://git.home.kies-media.de/api/v1/repos/<owner>/<repo>/issues?state=open" \
|
||||
-u "$GIT_USER:$GIT_PASS"
|
||||
```
|
||||
|
||||
### 2. For Each Open Issue
|
||||
|
||||
1. **Create a feature branch** from `main`:
|
||||
```bash
|
||||
git checkout main && git pull
|
||||
git checkout -b feature/issue-<number>-<short-description>
|
||||
```
|
||||
|
||||
2. **Clone repo if needed** (work in a temp dir):
|
||||
```bash
|
||||
git clone https://git.home.kies-media.de/<owner>/<repo>.git /tmp/<repo>
|
||||
```
|
||||
|
||||
3. **Implement the fix** – read the issue body, understand the requirement, implement it.
|
||||
|
||||
4. **Commit and push**:
|
||||
```bash
|
||||
git add -A
|
||||
git commit -m "Fix #<number>: <description>"
|
||||
git push -u origin feature/issue-<number>-<short-description>
|
||||
```
|
||||
|
||||
5. **Inform Martin** – send a summary of what was done and that the branch is ready for review/merge.
|
||||
|
||||
### 3. Do NOT
|
||||
|
||||
- Do not merge the branch yourself
|
||||
- Do not close the issue yourself
|
||||
- Do not push to `main` directly
|
||||
Reference in New Issue
Block a user