fix: fully forge-agnostic — no gitea/github references
This commit is contained in:
@@ -28,9 +28,9 @@ explicitly when invoking the skill):
|
||||
|-----------|-------------|----------|
|
||||
| `CLONE_DIR` | Directory to clone repos into | `~/src/analysis/` |
|
||||
| `CLONE_HOST` | Machine with disk + git for cloning | `forge`, `localhost` |
|
||||
| `GIT_REMOTE` | Where convention repos are pushed | `https://gitea.example.com` |
|
||||
| `GIT_REMOTE` | Where convention repos are pushed | `https://git.example.com` |
|
||||
| `GIT_ORG` | Org/user for convention repos | `myorg`, `username` |
|
||||
| `GIT_TOKEN_PATH` | Path to auth token for pushing | `~/.credentials/gitea-token` |
|
||||
| `GIT_TOKEN_PATH` | Path to auth token for pushing | `~/.credentials/git-token` |
|
||||
|
||||
**Minimum required:** `CLONE_DIR` and `GIT_REMOTE`. If others are
|
||||
omitted:
|
||||
@@ -43,9 +43,9 @@ omitted:
|
||||
## Codebase Analysis
|
||||
- CLONE_DIR: ~/src/analysis/
|
||||
- CLONE_HOST: my-dev-server (ssh user@host)
|
||||
- GIT_REMOTE: https://github.com
|
||||
- GIT_REMOTE: https://git.example.com
|
||||
- GIT_ORG: my-patterns
|
||||
- GIT_TOKEN_PATH: ~/.credentials/github-token
|
||||
- GIT_TOKEN_PATH: ~/.credentials/git-token
|
||||
```
|
||||
|
||||
If not explicitly provided, infer from workspace context (TOOLS.md,
|
||||
@@ -194,7 +194,7 @@ reasoning is pure expert knowledge.
|
||||
|
||||
### Phase 8: Synthesis
|
||||
|
||||
Produce two files. Push to Gitea.
|
||||
Produce two files. Push to `GIT_REMOTE`.
|
||||
|
||||
**`analysis.md`** — the full story:
|
||||
1. Repo shape and organizational philosophy
|
||||
@@ -268,7 +268,7 @@ Push to `GIT_REMOTE` under `GIT_ORG/<project>-conventions`. See
|
||||
and mailing lists.
|
||||
- **Repo too large to clone fully?** Clone shallow first, do Phase
|
||||
1-5, then `git fetch --unshallow` only if Phase 6-7 are needed.
|
||||
- **Private repo / no GitHub API?** Skip Phase 7. Phase 6 (local git
|
||||
- **Private repo / no forge API?** Skip Phase 7. Phase 6 (local git
|
||||
history) still works.
|
||||
- **<3000 commits?** Reduce Phase 6-7 expectations. Younger projects
|
||||
have less archaeology to mine — focus on Phase 5 (unique patterns)
|
||||
@@ -277,6 +277,6 @@ Push to `GIT_REMOTE` under `GIT_ORG/<project>-conventions`. See
|
||||
## Execution Notes
|
||||
|
||||
- Clone on `CLONE_HOST` — needs disk space for full git history
|
||||
- `gh api` for GitHub PR lookups (requires authenticated `gh` CLI)
|
||||
- `gh api` or equivalent for forge PR lookups (requires authentication)
|
||||
- One repo at a time for focused analysis
|
||||
- Markdownlint all output before pushing
|
||||
|
||||
@@ -103,18 +103,19 @@ gh api repos/<org>/<repo>/issues/<num>/comments \
|
||||
|
||||
## Output: Repo Creation & Push
|
||||
|
||||
Adapt to your git remote (Gitea, GitHub, GitLab, etc.):
|
||||
Adapt to your git remote:
|
||||
|
||||
```bash
|
||||
# Gitea example:
|
||||
GITEA_TOKEN=$(cat $GIT_TOKEN_PATH)
|
||||
curl -s -X POST "https://<git-host>/api/v1/user/repos" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
# Create repo via API (example — adapt auth and endpoint to your forge)
|
||||
TOKEN=$(cat $GIT_TOKEN_PATH)
|
||||
curl -s -X POST "$GIT_REMOTE/api/v1/user/repos" \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name": "<project>-conventions", "auto_init": true, "default_branch": "master", "license": "MIT"}'
|
||||
|
||||
# GitHub example:
|
||||
gh repo create $GIT_ORG/<project>-conventions --public --clone
|
||||
# Or use your forge's CLI:
|
||||
# gh repo create $GIT_ORG/<project>-conventions --public --clone
|
||||
# glab project create <project>-conventions
|
||||
|
||||
# Clone, add content, push
|
||||
cd <project>-conventions
|
||||
|
||||
Reference in New Issue
Block a user