54 Commits

Author SHA1 Message Date
lyn
95cf7b85fa feat(git-hangman-lab): add --visibility flag to repo create
Previously repo create only initialized the local repo and relied on
Gitea's push-to-create feature, which always yields a private
repository. Now the script pre-creates the remote via the Gitea API
honoring --visibility public|private (default: private), and falls
back to a PATCH when the repo already exists.
2026-04-15 16:22:30 +00:00
lyn
1e7af09245 publish-package: read current link state before re-linking
Gitea's /-/link/{repo} endpoint returns HTTP 400 "invalid argument"
whenever the package already has ANY linked repo, and /-/unlink returns
the same 400 when nothing is linked. Both are non-idempotent. Fix by
GET-ing the package version first, comparing the current repository to
the target, and only unlinking/linking when the state actually needs to
change. Idempotent across repeated publishes of the same image.
2026-04-15 11:03:32 +00:00
7745bc8bbc fix(git-hangman-lab): push docker images via SSH tunnel to bypass Cloudflare body limit
Cloudflare's free plan limits request bodies to ~100MB, causing 413 on large
docker layer pushes. Push through an SSH tunnel directly to the Gitea origin
server on vps.git instead of through Cloudflare.
2026-04-15 01:34:52 +00:00
8fc95aff22 fix(git-hangman-lab): publish-package link - remove password fallback, use only access-token 2026-04-14 23:09:34 +00:00
0c5e6b8688 refactor(git-hangman-lab): rewrite generate-access-token to use HTTP API instead of gitea CLI
- Use -u username:password basic auth for all API calls
- GET /users/{name}/tokens to find existing token
- DELETE /users/{name}/tokens/{id} to remove existing token
- POST /users/{name}/tokens with {"name": "...", "scopes": ["all"]}
- Extract 'sha1' field from POST response as the token value
- Use ego-mgr get default-username instead of secret-mgr get-username
2026-04-14 23:08:41 +00:00
9bd1452042 feat(git-hangman-lab): publish-package - switch AGENT_ID to repo owner for docker
1. For docker command, look up the repo owner via 'repo search' API
2. Use 'ego-mgr lookup' to get the owner's agent-id
3. Export AGENT_ID to that agent-id so docker push goes to correct namespace
4. Also fix link API auth: use '-u owner:token' (basic auth) instead of
   'Authorization: token' header, since repo owner's 'git' secret is a
   password not a bearer token
2026-04-14 22:17:47 +00:00
82e287b265 refactor(git-hangman-lab): get-latest now uses search API instead of list-all parsing
Replace fragile list-all + awk URL extraction with repo search command
for repo URL lookup. search returns {name,id,owner,clone-url} with
exact match, eliminating column-index dependency.
2026-04-14 22:01:34 +00:00
597282cbd7 fix(git-hangman-lab): repo search - output single match as {"name","id","owner","clone-url"}, exit 1 if not found 2026-04-14 21:57:44 +00:00
060b95f699 feat(git-hangman-lab): repo search - search repository by exact name
Send GET to /api/v1/repos/search?q={name} and filter results
by exact name match. Output: {"ok": true/false, "data": [...]}
with each match containing id, owner.login, name, clone_url.
2026-04-14 21:52:27 +00:00
436c723a2f fix(git-hangman-lab): publish-package - handle cross-owner repo link gracefully
The link step now:
1. Extracts the actual repo owner from the git remote URL
2. Captures HTTP response status and body
3. Shows a clear warning when the repo belongs to a different owner
  (requires site admin or matching owner), instead of silently failing
2026-04-14 19:46:31 +00:00
0b0f7d2a9f fix(git-hangman-lab): repo get-latest - fix URL extraction from list-all output
The awk field parser was using $3 (owner column) instead of $4 (url column).
Also fixed space trimming on extracted URL field.
2026-04-14 19:27:29 +00:00
lyn
d63f187bf2 Fix generate-access-token: capture stderr, check exit code, fail gracefully on duplicate token 2026-04-14 19:09:47 +00:00
lyn
87e75b77e8 Add repo get-latest subcommand: pull latest or clone if missing, with --recursive and --force support 2026-04-14 08:34:23 +00:00
lyn
a86b80e83a Logout before release in publish-package trap 2026-04-13 20:54:33 +00:00
lyn
0da1703140 Add docker logout to trap in publish-package docker branch 2026-04-13 20:50:28 +00:00
lyn
f0cb155fa4 Fix linkPackage: type=container, no body, POST only 2026-04-13 16:34:19 +00:00
lyn
b14d3acbba Fix linkPackage URL path: /packages/{owner}/docker/{name}/-/link/{repo_name} 2026-04-13 16:29:05 +00:00
lyn
f0b27d5a1a publish-package: add linkPackage API call after docker push 2026-04-13 16:23:10 +00:00
lyn
ae90cd7e0b publish-package: implement docker branch with lock-mgr and docker login/push 2026-04-13 15:07:20 +00:00
lyn
5c405ff5fa Add learn.sh: install skills from .skill-list to workspace/skills 2026-04-13 14:05:08 +00:00
lyn
d20e827a5c Integrate create-repo/add-collaborators/list-projs/repo-config into repo script, remove originals, update git-ctrl and SKILL.md 2026-04-13 13:49:23 +00:00
lyn
f3c19ba6e2 Add repo subcommand with create/add-collaborators/list-all/config; clean up SKILL.md 2026-04-13 13:46:46 +00:00
lyn
7c0b857a2f Add list-projs to git-ctrl routing and SKILL.md 2026-04-13 13:38:56 +00:00
lyn
bd84a50e98 Remove list-projs from git-ctrl routing; add to SKILL.md 2026-04-13 13:37:55 +00:00
lyn
5c8d1d3529 Fix read vars: match all 6 SQL columns in list-projs 2026-04-13 13:30:49 +00:00
lyn
50fe0d87d7 Fix can_write: add COALESCE to handle NULL from LEFT JOIN 2026-04-13 13:25:35 +00:00
lyn
39edaf3b83 Use .git URL format in list-projs 2026-04-13 13:20:35 +00:00
lyn
8fed12b3ab list-projs: use SSH+MySQL instead of HTTP API, fix visibility and can-write logic 2026-04-13 13:19:03 +00:00
lyn
457b989c1f Use type=all to include public repos in list-projs 2026-04-13 10:35:07 +00:00
lyn
c8642368e9 Add list-projs to git-ctrl and SKILL.md 2026-04-13 10:21:09 +00:00
lyn
5a5a2498c0 Add list-projs script 2026-04-13 10:16:52 +00:00
lyn
fc720ac05a Allow dots in repo name for create-repo 2026-04-13 10:02:01 +00:00
lyn
7f2ca44ef6 Add publish-package placeholder script 2026-04-12 19:15:07 +00:00
lyn
db89b9e88e Add recruitment/workflows/interviewer.md placeholder 2026-04-12 18:59:07 +00:00
lyn
f20bfeea80 Clarify discussion guide placeholder and lookup instructions 2026-04-12 15:50:07 +00:00
lyn
87c98b26b8 Update discussion guide to English with discord-id note 2026-04-12 15:48:06 +00:00
lyn
f6b13246d8 Update SKILL.md with full recruitment workflow 2026-04-12 15:44:58 +00:00
lyn
2e9be8375c Add bindings update and discord account config to onboard script 2026-04-12 15:18:46 +00:00
lyn
8f3055be62 Move onboard to recruitment/scripts with absolute paths 2026-04-12 15:01:44 +00:00
lyn
cd88440361 Add onboard script for agent onboarding workflow 2026-04-12 14:59:09 +00:00
lyn
f73fd68e49 Add --public flag to secret-mgr get-secret 2026-04-12 14:32:15 +00:00
lyn
1d8427422a Add recruitment skill for onboarding new agents 2026-04-12 14:21:13 +00:00
lyn
4d98d83fbb fix: use /pulls instead of /pulls/pinned (#4) 2026-04-01 17:09:04 +00:00
lyn
dc5ce61bf7 feat: add create-pr command (#3) 2026-04-01 15:52:42 +00:00
h z
d8dee3b062 Merge pull request 'feature/add-create-repo-script' (#2) from feature/add-create-repo-script into main
Reviewed-on: #2
2026-04-01 00:45:19 +00:00
lyn
32332bea41 fix(create-repo): update error message 2026-04-01 00:43:33 +00:00
lyn
38f5a52a14 fix(create-repo): require AGENT_WORKSPACE env var instead of default 2026-04-01 00:42:27 +00:00
lyn
ca9d3b4fe5 feat(git-hangman-lab): add create-repo command
- Add create-repo script for creating new repositories on git.hangman-lab.top
- Integrate create-repo into git-ctrl dispatcher
- Update SKILL.md with new command documentation
2026-04-01 00:38:47 +00:00
lyn
d358abf1ce restructure: flatten scripts dirs, remove roster, update SKILL.md 2026-03-25 07:30:09 +00:00
lyn
b9785b6295 use ego-mgr for username/email instead of CLI flags 2026-03-24 19:18:20 +00:00