feat(actions): rebrand actions bot user and add branch protection whitelist #234

Merged
jmiller merged 1 commits from feat/actions-bot-rebrand-and-branch-protection into dev 2026-05-30 15:48:13 +00:00
Owner

Summary

  • Rebrand built-in actions bot user from gitea-actions to mokogitea-actions with MokoGitea branding
  • Add backward-compatible name recognition for github-actions[bot], gitea-actions[bot], and mokogitea-actions[bot]
  • Add WhitelistActionsUser toggles to branch protection (push, force push, merge) so CI/CD workflows can push to protected branches
  • New DB migration (v334) adds the three boolean columns to protected_branch table
  • Updated API structs, web UI, locale strings, and integration tests

Test plan

  • Verify actions bot user shows as mokogitea-actions in API responses
  • Verify GetSystemUserByName resolves all three name variants with/without [bot] suffix
  • Verify branch protection UI shows actions user whitelist checkboxes
  • Verify enabling push whitelist for actions user allows CI pushes to protected branches
  • Verify DB migration adds new columns without errors
  • Run unit tests: go test ./models/user/ -run TestSystemUser

Closes #233

Generated with Claude Code - @MokoBot (Claude Opus 4.6)

## Summary - Rebrand built-in actions bot user from gitea-actions to mokogitea-actions with MokoGitea branding - Add backward-compatible name recognition for github-actions[bot], gitea-actions[bot], and mokogitea-actions[bot] - Add WhitelistActionsUser toggles to branch protection (push, force push, merge) so CI/CD workflows can push to protected branches - New DB migration (v334) adds the three boolean columns to protected_branch table - Updated API structs, web UI, locale strings, and integration tests ## Test plan - [ ] Verify actions bot user shows as mokogitea-actions in API responses - [ ] Verify GetSystemUserByName resolves all three name variants with/without [bot] suffix - [ ] Verify branch protection UI shows actions user whitelist checkboxes - [ ] Verify enabling push whitelist for actions user allows CI pushes to protected branches - [ ] Verify DB migration adds new columns without errors - [ ] Run unit tests: go test ./models/user/ -run TestSystemUser Closes #233 Generated with [Claude Code](https://claude.com/claude-code) - @MokoBot (Claude Opus 4.6)
jmiller added 1 commit 2026-05-30 15:39:42 +00:00
feat(actions): rebrand actions bot user and add branch protection whitelist
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 2s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || 'development' }}) (pull_request) Successful in 1m13s
d4824dc05b
Rebrand the built-in actions bot user from upstream Gitea naming to
MokoGitea branding:
- Name: gitea-actions → mokogitea-actions
- FullName: Gitea Actions → MokoGitea Actions
- Email: teabot@gitea.io → mokogitea-actions[bot]@mokoconsulting.tech

Add backward-compatible name recognition so all three bot name variants
(mokogitea-actions, gitea-actions, github-actions) with optional [bot]
suffix resolve to the same system user.

Add WhitelistActionsUser, MergeWhitelistActionsUser, and
ForcePushAllowlistActionsUser toggles to branch protection rules,
allowing CI/CD workflows to push to protected branches when explicitly
enabled. Previously the actions bot (virtual user ID -2) could never be
added to whitelist because updateUserWhitelist() only validates real
database users.

Closes #233

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jmiller merged commit 524b38f494 into dev 2026-05-30 15:48:13 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#234