Manage Gitea users; add teabot personality bot accounts #45
Reference in New Issue
Block a user
Delete Branch "benvin/teabot-users"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
teabot (
unkin/teabot, just merged) dispatches Claude sessions using distinctper-personality Gitea accounts so its work is attributable. Those accounts must
exist as static users. terraform-git already manages the Gitea instance
declaratively but had no way to manage users -- only orgs, repos, teams, and
branch protection. This adds a user config kind and uses it to provision
teabot's two personalities.
Account usernames match teabot's
config.example.yaml/ docs (teabot-implementer,teabot-reviewer) so its personality logins resolve without further config.Tokens are intentionally out of scope -- they will come from the upcoming
vault-plugin-secrets-gitea engine (or a static KV entry initially). The
gitea_userresource requires a password argument, so a per-userrandom_passwordis generated; nothing sensitive is hardcoded and only aplaceholder lives in state.
How
modules/usersubmodule that creates agitea_userplus arandom_passwordfor the required password (providergo-gitea/gitea 0.7.0,already pinned -- it already ships the user resource, so no version bump).
userconfig kind: dropconfig/git.unkin.net/user/<name>.yamland it becomes a user, mirroring how repositories and teams work
(
config/config.hcllocals +variable "user"+module "user"+ terragrunt input).hashicorp/randomprovider to the modulerequired_providers.teabot-implementerandteabot-reviewerwith a conservativeposture:
admin: false,allow_create_organization: false,max_repo_creation: 0,visibility: limited,send_notificationoff.Notes for review
left out -- they will be added once teabot's watch list is finalised.
restrictedis available as a per-user field (default false) for when that happens.
config/git.unkin.net/user/.