refactor: parameterize environment — no hardcoded paths
Configuration (CLONE_DIR, CLONE_HOST, GIT_REMOTE, GIT_ORG, GIT_TOKEN_PATH) provided by invoker's workspace context. Commands reference shows Gitea + GitHub examples.
This commit is contained in:
+11
-8
@@ -9,7 +9,7 @@ syntax — the SKILL.md tells you WHAT to look for; this tells you HOW.
|
||||
|
||||
```bash
|
||||
# Clone (always full — never --depth 1)
|
||||
cd ~/src/analysis && git clone <url>
|
||||
cd $CLONE_DIR && git clone <url>
|
||||
|
||||
# Dimensions
|
||||
du -sh <repo>
|
||||
@@ -103,20 +103,23 @@ gh api repos/<org>/<repo>/issues/<num>/comments \
|
||||
|
||||
## Output: Repo Creation & Push
|
||||
|
||||
```bash
|
||||
GITEA_TOKEN=$(cat ~/.openclaw/credentials/gitea-rodin)
|
||||
Adapt to your git remote (Gitea, GitHub, GitLab, etc.):
|
||||
|
||||
# Create repo
|
||||
curl -s -X POST "https://gitea.weiker.me/api/v1/user/repos" \
|
||||
```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" \
|
||||
-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
|
||||
|
||||
# Clone, add content, push
|
||||
git clone "https://rodin:${GITEA_TOKEN}@gitea.weiker.me/rodin/<project>-conventions.git"
|
||||
cd <project>-conventions
|
||||
git config user.name "Rodin"
|
||||
git config user.email "rodin@forgedthought.ai"
|
||||
git config user.name "<your-name>"
|
||||
git config user.email "<your-email>"
|
||||
# ... add files ...
|
||||
git add -A && git commit -m "docs: initial conventions from <org>/<project>" && git push
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user