Add a repo_mirror_push tool to configure a push mirror from a Gitea repo to an external remote (e.g. GitHub). This enables the GitHub-as-master workflow where GitHub is canonical and Gitea mirrors from it — or the inverse where Gitea pushes to GitHub after each commit.
Gitea API
POST /api/v1/repos/{owner}/{repo}/push_mirrors GET /api/v1/repos/{owner}/{repo}/push_mirrors DELETE /api/v1/repos/{owner}/{repo}/push_mirrors/{name}
Tool spec
tool: repo_mirror_push_add
params:
owner: string
name: string // repo name
remote_address: string // e.g. https://github.com/mathiasb/my-repo.git
remote_username: string?
remote_password: string? // token — handled as secret, never logged
interval: string? // cron interval, default: "8h"
sync_on_commit: bool? // push immediately on each commit, default: true
tool: repo_mirror_push_list
params:
owner: string
name: string
tool: repo_mirror_push_delete
params:
owner: string
name: string
mirror_name: string
Required token permission
write:repository scope on the Gitea API token.
Risk classification
repo_mirror_push_add: MEDIUM — involves storing a remote credential in Gitea. repo_mirror_push_list: LOW — read-only. repo_mirror_push_delete: MEDIUM — removes sync configuration.
Security note
remote_password (GitHub token) must never be logged or returned in tool output. Gitea stores it encrypted — the tool should confirm storage but not echo the value back.
Motivation
ADR (2026-05-14): GitHub is canonical remote, Gitea mirrors via push-mirror. Setting this up for all existing repos currently requires web UI per repo. hyperguild new-project should call this tool as part of repo initialisation to wire up the GitHub mirror automatically.
Dependency
Pairs with repo_create (#13) — new-project flow: create on Gitea → add push mirror to GitHub.
## Summary
Add a `repo_mirror_push` tool to configure a push mirror from a Gitea repo to an external remote (e.g. GitHub). This enables the GitHub-as-master workflow where GitHub is canonical and Gitea mirrors from it — or the inverse where Gitea pushes to GitHub after each commit.
## Gitea API
`POST /api/v1/repos/{owner}/{repo}/push_mirrors`
`GET /api/v1/repos/{owner}/{repo}/push_mirrors`
`DELETE /api/v1/repos/{owner}/{repo}/push_mirrors/{name}`
## Tool spec
```
tool: repo_mirror_push_add
params:
owner: string
name: string // repo name
remote_address: string // e.g. https://github.com/mathiasb/my-repo.git
remote_username: string?
remote_password: string? // token — handled as secret, never logged
interval: string? // cron interval, default: "8h"
sync_on_commit: bool? // push immediately on each commit, default: true
tool: repo_mirror_push_list
params:
owner: string
name: string
tool: repo_mirror_push_delete
params:
owner: string
name: string
mirror_name: string
```
## Required token permission
`write:repository` scope on the Gitea API token.
## Risk classification
`repo_mirror_push_add`: **MEDIUM** — involves storing a remote credential in Gitea.
`repo_mirror_push_list`: **LOW** — read-only.
`repo_mirror_push_delete`: **MEDIUM** — removes sync configuration.
## Security note
`remote_password` (GitHub token) must never be logged or returned in tool output. Gitea stores it encrypted — the tool should confirm storage but not echo the value back.
## Motivation
ADR (2026-05-14): GitHub is canonical remote, Gitea mirrors via push-mirror. Setting this up for all existing repos currently requires web UI per repo. `hyperguild new-project` should call this tool as part of repo initialisation to wire up the GitHub mirror automatically.
## Dependency
Pairs with `repo_create` (#13) — new-project flow: create on Gitea → add push mirror to GitHub.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Add a
repo_mirror_pushtool to configure a push mirror from a Gitea repo to an external remote (e.g. GitHub). This enables the GitHub-as-master workflow where GitHub is canonical and Gitea mirrors from it — or the inverse where Gitea pushes to GitHub after each commit.Gitea API
POST /api/v1/repos/{owner}/{repo}/push_mirrorsGET /api/v1/repos/{owner}/{repo}/push_mirrorsDELETE /api/v1/repos/{owner}/{repo}/push_mirrors/{name}Tool spec
Required token permission
write:repositoryscope on the Gitea API token.Risk classification
repo_mirror_push_add: MEDIUM — involves storing a remote credential in Gitea.repo_mirror_push_list: LOW — read-only.repo_mirror_push_delete: MEDIUM — removes sync configuration.Security note
remote_password(GitHub token) must never be logged or returned in tool output. Gitea stores it encrypted — the tool should confirm storage but not echo the value back.Motivation
ADR (2026-05-14): GitHub is canonical remote, Gitea mirrors via push-mirror. Setting this up for all existing repos currently requires web UI per repo.
hyperguild new-projectshould call this tool as part of repo initialisation to wire up the GitHub mirror automatically.Dependency
Pairs with
repo_create(#13) — new-project flow: create on Gitea → add push mirror to GitHub.Shipped in v0.2.2. Closing during cleanup pass.