Files
devx/docs/specs/DEVX-161.md
T
emil dcfbd4c0c2
Post-merge / detect-and-configure (push) Successful in 14s
Post-merge / release-and-maintain (push) Canceled after 13m38s
DEVX-161: fix: fall back to CI bot token for auto-merge approval
Co-authored-by: emil User <emil.simeonov@tutanota.com>
2026-08-26 08:12:00 +00:00

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