Initial: gitea-api (read-only) + sporel-commit tools with Claude skills
This commit is contained in:
30
skills/gitea-api/SKILL.md
Normal file
30
skills/gitea-api/SKILL.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
name: gitea-api
|
||||
description: Read-only Gitea API queries (list org repos, inspect a repo/PR/issue, check CI runs). Use instead of hand-writing curl with tokens. GET-only and allowlisted, so it never prompts.
|
||||
---
|
||||
|
||||
# Gitea API (read-only)
|
||||
|
||||
Run for any read query against Gitea instead of constructing `curl` with a token:
|
||||
|
||||
```bash
|
||||
/root/projects/gitea-devtools/gitea-api.sh <path> | jq <filter>
|
||||
```
|
||||
|
||||
Path omits the `api/v1/` prefix and an optional leading `/`. Examples:
|
||||
|
||||
| Goal | Command |
|
||||
|------|---------|
|
||||
| List org repos | `gitea-api.sh /orgs/sporel/repos?limit=100 \| jq -r '.[].full_name'` |
|
||||
| Inspect a repo | `gitea-api.sh repos/calic/claude-config` |
|
||||
| Default branch | `gitea-api.sh repos/sporel/sporel-engine \| jq -r .default_branch` |
|
||||
| Open PRs | `gitea-api.sh repos/<owner>/<name>/pulls?state=open` |
|
||||
| Recent CI runs | `gitea-api.sh repos/<owner>/<name>/actions/tasks` |
|
||||
|
||||
It auto-resolves a temp read-scope token via the local `gitea` container (or
|
||||
uses `$GITEA_TOKEN`). GET-only — it cannot mutate anything, which is why it's
|
||||
safe to run without prompting.
|
||||
|
||||
On `ERROR: ... HTTP <code>` read the hint line (401 = token/scope, 404 = path).
|
||||
If a real query path is missing from this list, just use it — the script
|
||||
accepts any GET path.
|
||||
37
skills/sporel-commit/SKILL.md
Normal file
37
skills/sporel-commit/SKILL.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: sporel-commit
|
||||
description: Commit + push all dirty local Sporel repos in one shot with a shared message, using each repo's own author. Use after making changes across multiple Sporel repos instead of looping git add/commit/push by hand.
|
||||
---
|
||||
|
||||
# Sporel Commit
|
||||
|
||||
Commits every **dirty** local Sporel repo with one message and pushes the safe
|
||||
ones — replacing the manual `for repo; do cd; git add; git commit; git push`
|
||||
loop.
|
||||
|
||||
```bash
|
||||
/root/projects/gitea-devtools/sporel-commit.sh --dry-run "<msg>" # ALWAYS preview first
|
||||
/root/projects/gitea-devtools/sporel-commit.sh "<msg>"
|
||||
```
|
||||
|
||||
## How to use
|
||||
|
||||
1. **Always `--dry-run` first.** It lists which repos would be committed, how
|
||||
many files each, and which author it will use. Confirm that matches intent.
|
||||
2. Run without `--dry-run` to commit + push.
|
||||
|
||||
## Behaviour
|
||||
|
||||
- Author per repo = that repo's **own last-commit author** (Sporel repos are
|
||||
mixed Calic / Axel Meyer — never assume uniform); email always
|
||||
`axel.meyer@durania.net`.
|
||||
- `git add -A` then commit with the shared message.
|
||||
- Pushes only if the branch is ahead and **not** diverged. Diverged repos are
|
||||
committed locally but reported for manual rebase — never force-pushed.
|
||||
- CI triggers on tags (`v0.x.0`), not master pushes, so pushing WIP is safe.
|
||||
|
||||
Exit `0` clean · `2` attention (diverged / no upstream) · `1` error. Address
|
||||
every ATTENTION line. For tagged releases use `/deploy` instead — this is for
|
||||
ordinary commits across many repos.
|
||||
|
||||
Complements `/sporel-sync` (pull/push reconciliation, no commit).
|
||||
Reference in New Issue
Block a user