Skip to content

Commit 4701e6d

Browse files
committed
Add r? me as an alias for self-assignment
1 parent 806153a commit 4701e6d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/handlers/assign.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,13 @@ async fn find_reviewer_from_names(
803803
return Ok(ReviewerSelection::from_name(name.clone()));
804804
}
805805

806+
// Allow `me` as an alias for self-assign, which is always allowed.
807+
if let [name] = names
808+
&& name == "me"
809+
{
810+
return Ok(ReviewerSelection::from_name(requested_by.to_string()));
811+
}
812+
806813
let candidates =
807814
candidate_reviewers_from_names(db, workqueue, teams, config, issue, names).await?;
808815
assert!(!candidates.is_empty());

0 commit comments

Comments
 (0)