agentci: activate repos in Woodpecker via API (agents have no Woodpecker token) #6

Closed
opened 2026-08-16 19:12:49 +10:00 by unkin-agent · 1 comment
Member

Problem

terraform-git no longer auto-activates repos in Woodpecker (its woodpecker_repository module was removed with destroy=false). Every newly-created Gitea repo must be enabled in Woodpecker by hand before any pipeline runs. Agents cannot: Woodpecker auth is Gitea-OAuth/UI only and there is no Vault-issued Woodpecker token for the agent (unlike gitea/creds/unkin-agent). Symptom: watchpr shows ci_status=pending forever because the repo is not active, indistinguishable from a running build.

Proposal

Add a deterministic Go subcommand (agentci enable /, or extend agentpr) that activates a repo in Woodpecker via POST /api/repos?forge_remote_id=<gitea_repo_id>, idempotently. Prerequisite: a Vault path issuing a scoped Woodpecker token for the agent, mirroring the gitea/creds/unkin-agent pattern. Bonus: agentci status / so the orchestrator can distinguish not-activated from pending.

Acceptance

  • agentci enable unkin/ activates the repo non-interactively and is idempotent.
  • Uses a Vault-issued token (no inline secrets, no Ben LDAP token).
  • Documented in agent-tools README + CLAUDE.md agent-tooling section.
  • watchpr/agentci status reports an un-activated repo distinctly from a pending pipeline.
## Problem terraform-git no longer auto-activates repos in Woodpecker (its woodpecker_repository module was removed with destroy=false). Every newly-created Gitea repo must be enabled in Woodpecker by hand before any pipeline runs. Agents cannot: Woodpecker auth is Gitea-OAuth/UI only and there is no Vault-issued Woodpecker token for the agent (unlike gitea/creds/unkin-agent). Symptom: watchpr shows ci_status=pending forever because the repo is not active, indistinguishable from a running build. ## Proposal Add a deterministic Go subcommand (agentci enable <owner>/<repo>, or extend agentpr) that activates a repo in Woodpecker via POST /api/repos?forge_remote_id=<gitea_repo_id>, idempotently. Prerequisite: a Vault path issuing a scoped Woodpecker token for the agent, mirroring the gitea/creds/unkin-agent pattern. Bonus: agentci status <owner>/<repo> so the orchestrator can distinguish not-activated from pending. ## Acceptance - agentci enable unkin/<repo> activates the repo non-interactively and is idempotent. - Uses a Vault-issued token (no inline secrets, no Ben LDAP token). - Documented in agent-tools README + CLAUDE.md agent-tooling section. - watchpr/agentci status reports an un-activated repo distinctly from a pending pipeline.
Owner

No longer required, have provided token for agents

No longer required, have provided token for agents
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/agent-tools#6