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