Fix CODEOWNERS review request attribution using comment metadata (#36348)
Fixes #36333 ## Problem When CODEOWNERS automatically assigns reviewers to a pull request, the timeline incorrectly shows the PR author as the one who requested the review (e.g., "PR_AUTHOR requested review from CODE_OWNER"). This is misleading since the action was triggered automatically by CODEOWNERS rules, not by the PR author. ## Solution Store CODEOWNERS attribution in comment metadata instead of changing the doer user: - Add `SpecialDoerName` field to `CommentMetaData` struct (value: `"CODEOWNERS"` for CODEOWNERS-triggered requests) - Pass `isCodeOwners=true` to `AddReviewRequest` and `AddTeamReviewRequest` functions - Template can check this metadata to show appropriate attribution message --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
committed by
GitHub
parent
49edbbbc2e
commit
65422fde4d
@@ -1702,6 +1702,7 @@
|
||||
"repo.issues.review.content.empty": "You need to leave a comment indicating the requested change(s).",
|
||||
"repo.issues.review.reject": "requested changes %s",
|
||||
"repo.issues.review.wait": "was requested for review %s",
|
||||
"repo.issues.review.codeowners_rules": "CODEOWNERS rules",
|
||||
"repo.issues.review.add_review_request": "requested review from %s %s",
|
||||
"repo.issues.review.remove_review_request": "removed review request for %s %s",
|
||||
"repo.issues.review.remove_review_request_self": "declined to review %s",
|
||||
|
||||
Reference in New Issue
Block a user