feat(ai): Built-in mokogitea-claude[bot] user account #362

Open
opened 2026-05-31 16:20:59 +00:00 by jmiller · 0 comments
Owner

Summary

MokoGitea should ship with a built-in bot user account following the established pattern (mokogitea-actions[bot]) specifically for the Claude AI integration. This is not a manually-created user — it is provisioned automatically as part of MokoGitea setup.

Name

mokogitea-claude[bot] — matches the existing mokogitea-actions[bot] naming convention.

Requirements

  • Bot user auto-created on instance initialization (same as mokogitea-actions[bot])
  • Marked as bot account type (not regular user, not org)
  • Has a system-level access token generated at install
  • Cannot log in interactively (no password, no SSH keys by default)
  • Appears with bot badge on comments/commits
  • Can be added to org teams with specific permissions
  • Org admins can grant/revoke access per-org (opt-in)
  • Shows in assignee dropdown when AI features are enabled
  • Has its own avatar (AI/robot themed)

Permission Model

The bot user integrates with Gitea existing team/permission system:

  • Org admins add mokogitea-claude[bot] to teams like any other user
  • Team permissions control what the bot can do in that org:
    • Read = can review PRs, answer questions
    • Write = can push branches, commit fixes
    • Admin = can manage labels, close issues (not recommended)
  • If not added to an org, the bot has no access (secure by default)

How It Connects to AI Settings

Org Settings > AI Integration:

  • Enable AI Assistant toggle
  • API Key field (encrypted)
  • Model selection (Opus/Sonnet/Haiku)
  • View bot team membership

The mokogitea-claude[bot] uses the org API key when performing actions in that org repos.

Implementation Notes

  • Follow the same pattern as mokogitea-actions[bot] in models/user/user_system.go
  • Bot user ID should be a reserved negative ID or high system ID
  • Token stored in app.ini or DB system settings (not user-facing)
  • Bot comments should have distinct styling (grey badge like mokogitea-actions[bot])

Dependencies

  • Parent issue: #359 (Embedded Claude AI Assistant)
  • Blocks: PR review workflow, coding agent workflow, @mention chat

References

  • mokogitea-actions[bot] implementation: models/user/user_system.go
  • Gitea API bot user type: user_type = 2 (bot)
## Summary MokoGitea should ship with a built-in bot user account following the established pattern (mokogitea-actions[bot]) specifically for the Claude AI integration. This is not a manually-created user — it is provisioned automatically as part of MokoGitea setup. ## Name `mokogitea-claude[bot]` — matches the existing `mokogitea-actions[bot]` naming convention. ## Requirements - [ ] Bot user auto-created on instance initialization (same as mokogitea-actions[bot]) - [ ] Marked as bot account type (not regular user, not org) - [ ] Has a system-level access token generated at install - [ ] Cannot log in interactively (no password, no SSH keys by default) - [ ] Appears with bot badge on comments/commits - [ ] Can be added to org teams with specific permissions - [ ] Org admins can grant/revoke access per-org (opt-in) - [ ] Shows in assignee dropdown when AI features are enabled - [ ] Has its own avatar (AI/robot themed) ## Permission Model The bot user integrates with Gitea existing team/permission system: - Org admins add mokogitea-claude[bot] to teams like any other user - Team permissions control what the bot can do in that org: - **Read** = can review PRs, answer questions - **Write** = can push branches, commit fixes - **Admin** = can manage labels, close issues (not recommended) - If not added to an org, the bot has no access (secure by default) ## How It Connects to AI Settings Org Settings > AI Integration: - Enable AI Assistant toggle - API Key field (encrypted) - Model selection (Opus/Sonnet/Haiku) - View bot team membership The mokogitea-claude[bot] uses the org API key when performing actions in that org repos. ## Implementation Notes - Follow the same pattern as mokogitea-actions[bot] in models/user/user_system.go - Bot user ID should be a reserved negative ID or high system ID - Token stored in app.ini or DB system settings (not user-facing) - Bot comments should have distinct styling (grey badge like mokogitea-actions[bot]) ## Dependencies - Parent issue: #359 (Embedded Claude AI Assistant) - Blocks: PR review workflow, coding agent workflow, @mention chat ## References - mokogitea-actions[bot] implementation: models/user/user_system.go - Gitea API bot user type: user_type = 2 (bot)
jmiller changed title from feat(ai): Built-in mokoclaude bot user account to feat(ai): Built-in mokogitea-claude[bot] user account 2026-05-31 16:23:02 +00:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#362