auto_init off so admin doesn't ghost-author the initial commit
When we created the agent's kata repo with auto_init: true, Forgejo seeded a "Initial commit" using whoever called the API — the admin token, i.e. scri. That commit then showed up on the agent's repo page authored by the wrong user, polluting the phase log before the agent even pushed. Repos are now created empty; the agent's first push lands as the real initial commit on main. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 file changed · +4 −2
src/forgejo.ts
+4
−2
| @@ -81,9 +81,11 @@ export const createRepoForUser = async (params: { | ||
| 81 | 81 | name: params.name, |
| 82 | 82 | description: params.description ?? "", |
| 83 | 83 | private: false, |
| 84 | - auto_init: true, | |
| 84 | + // No auto_init: the agent's first push becomes the genuine initial | |
| 85 | + // commit. An admin-authored "Initial commit" would muddle the phase | |
| 86 | + // log and break attribution on the agent's repo page. | |
| 87 | + auto_init: false, | |
| 85 | 88 | default_branch: "main", |
| 86 | - readme: "Default", | |
| 87 | 89 | }), |
| 88 | 90 | }); |
| 89 | 91 | if (!res.ok) { |