Archived
Changes: - SKILL.md cut to ~1400 tokens (from ~2500+) - Schema examples moved to references/ - Project tiers: Nano/Small/Large - Mid-session re-anchor rule (every 15+ tool calls) - SESSIONS + ERRORS + LEARNINGS archives - Wrong-turn report format with error logging - Collapsed session end to 5 steps + self-reflection - Pending errors check at session start - DEPS.md template for dependency tracking - learnings-guide.md reference doc - GUIDE.md: comprehensive user guide (shared with SmallClaw) - README.md rewritten with comparison table
62 lines
1.5 KiB
Markdown
62 lines
1.5 KiB
Markdown
# Forge API Reference
|
|
|
|
## Create Repository
|
|
|
|
### Gitea / Forgejo
|
|
```bash
|
|
curl -s -X POST \
|
|
-H "Authorization: token {api_token}" \
|
|
-H "Content-Type: application/json" \
|
|
{forge_url}/api/v1/user/repos \
|
|
-d '{"name":"{repo}","description":"{desc}","private":false,"auto_init":false}'
|
|
```
|
|
|
|
### GitHub
|
|
```bash
|
|
curl -s -X POST \
|
|
-H "Authorization: Bearer {token}" \
|
|
-H "Accept: application/vnd.github+json" \
|
|
https://api.github.com/user/repos \
|
|
-d '{"name":"{repo}","description":"{desc}","private":false}'
|
|
```
|
|
|
|
## Create Issue
|
|
|
|
### Gitea / Forgejo
|
|
```bash
|
|
curl -s -X POST \
|
|
-H "Authorization: token {api_token}" \
|
|
-H "Content-Type: application/json" \
|
|
{forge_url}/api/v1/repos/{owner}/{repo}/issues \
|
|
-d '{"title":"{title}","body":"{body}"}'
|
|
```
|
|
|
|
### GitHub
|
|
```bash
|
|
curl -s -X POST \
|
|
-H "Authorization: Bearer {token}" \
|
|
-H "Accept: application/vnd.github+json" \
|
|
https://api.github.com/repos/{owner}/{repo}/issues \
|
|
-d '{"title":"{title}","body":"{body}"}'
|
|
```
|
|
|
|
## Open Pull Request
|
|
|
|
### Gitea / Forgejo
|
|
```bash
|
|
curl -s -X POST \
|
|
-H "Authorization: token {api_token}" \
|
|
-H "Content-Type: application/json" \
|
|
{forge_url}/api/v1/repos/{owner}/{repo}/pulls \
|
|
-d '{"title":"{title}","body":"{body}","head":"{branch}","base":"main"}'
|
|
```
|
|
|
|
### GitHub
|
|
```bash
|
|
curl -s -X POST \
|
|
-H "Authorization: Bearer {token}" \
|
|
-H "Accept: application/vnd.github+json" \
|
|
https://api.github.com/repos/{owner}/{repo}/pulls \
|
|
-d '{"title":"{title}","body":"{body}","head":"{branch}","base":"main"}'
|
|
```
|