gitea/models/issues
Gregorius Bima Kharisma Wicaksana 65422fde4d
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>
2026-01-16 14:52:57 +00:00
..
assignees.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35428) 2025-09-10 03:15:01 +00:00
assignees_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
comment.go Fix CODEOWNERS review request attribution using comment metadata (#36348) 2026-01-16 14:52:57 +00:00
comment_code.go Fix footnote jump behavior on the issue page. (#34621) 2025-06-09 17:18:11 +00:00
comment_list.go Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
comment_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
content_history.go Fix issue & comment history bugs (#29525) 2024-03-01 16:46:02 +00:00
content_history_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
dependency.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
dependency_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
issue.go Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
issue_index.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
issue_label.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
issue_label_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
issue_list.go Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
issue_list_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
issue_lock.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
issue_pin.go Move issue pin to an standalone table for querying performance (#33452) 2025-02-17 11:28:37 -08:00
issue_project.go Fix project issues list and counting (#33594) 2025-02-17 05:14:56 +00:00
issue_search.go Fix various bugs (#35684) 2025-10-19 00:37:50 +08:00
issue_stats.go Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
issue_test.go Fix various bugs (#35684) 2025-10-19 00:37:50 +08:00
issue_update.go Fix incorrect pull request counter (#35819) 2025-11-03 20:52:13 +00:00
issue_user.go Add combined index for issue_user.uid and issue_id (#28080) 2023-12-14 09:26:59 +00:00
issue_user_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
issue_watch.go Strict pagination check (#32548) 2024-11-25 09:56:50 +08:00
issue_watch_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
issue_xref.go Fix review comment/dimiss comment x reference can be refereced back (#35094) 2025-07-16 12:36:37 +00:00
issue_xref_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
label.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
label_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
milestone.go Closed milestones with no issues now show as 100% completed (#36220) 2025-12-20 16:16:20 +00:00
milestone_list.go Added default sorting milestones by name (#27084) 2024-07-16 10:08:54 +02:00
milestone_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
pull.go Fix incorrect pull request counter (#35819) 2025-11-03 20:52:13 +00:00
pull_list.go Automatic generation of release notes (#35977) 2025-12-17 02:01:19 +00:00
pull_list_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
pull_test.go Fix CODEOWNERS review request attribution using comment metadata (#36348) 2026-01-16 14:52:57 +00:00
reaction.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
review.go Fix CODEOWNERS review request attribution using comment metadata (#36348) 2026-01-16 14:52:57 +00:00
review_list.go Fix inputing review comment will remove reviewer (#35591) 2025-10-09 19:55:14 -07:00
review_test.go Fix CODEOWNERS review request attribution using comment metadata (#36348) 2026-01-16 14:52:57 +00:00
stopwatch.go Add more check for stopwatch read or list (#36340) 2026-01-13 13:13:39 +00:00
stopwatch_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
tracked_time.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
tracked_time_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00