Public Access
886 B
886 B
DEVX-161: Fix auto-merge self-approval: use CI bot token fallback
Problem
The auto-merge workflow posts an APPROVE review using
REVIEWER_GITEA_API_TOKEN. When this token belongs to the same user
who created the PR, Gitea rejects the self-approval, causing the merge
to fail with HTTP 405 "Does not have enough approvals."
Approach
Try REVIEWER_GITEA_API_TOKEN first; if it fails (self-approval
rejection), fall back to CI_GITEA_API_TOKEN (kireto — CI bot account).
REQ-1: Auto-merge posts approval with fallback to CI bot token REQ-2: Approval step reports which token succeeded
Test Plan
- Create a PR and observe auto-merge succeeds
Deploy Plan
- Merge to master
Rollback Plan
- Revert the merge commit
Acceptance Criteria
- REQ-1: Auto-merge posts approval with fallback to CI bot token
- REQ-2: Approval step reports which token succeeded