Bot should request itself as reviewer before posting #35
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Problem
The bot posts reviews via the API, but never adds itself as a requested reviewer on the PR. This means:
The bot should work out of the box without any branch protection setup.
Fix
Before posting a review, the bot should call:
This ensures the bot always appears in the Reviewers sidebar. When the review is subsequently posted, Gitea will show the approval/rejection status there.
Implementation
RequestReviewer(ctx, owner, repo, number, username)togitea/client.goGET /userwith its token (one extra API call, but self-discovering)--reviewer-nameflag (explicit, no extra call)RequestReviewerbeforePostReviewin the main flowAcceptance criteria
GET /user