Watch
0
0
Fork
You've already forked hyperhive
0

review classifier: it reads the PR's title and description, and a rule on closing keywords

The controller reads the PR's title and description with the rest of it and
puts both in the run's shared context, ahead of the commits. An empty
description reads as `(none)`. `TryOut` carries them as optional fields, so a
controller that sends none still gets its run answered.

New rule `closes-only-finished-issues`: a description that carries a closing
keyword for an issue and also says the PR leaves part of it undone is a
violation, because the keyword closes the issue when the PR merges.
This commit is contained in:
argus 2026-11-23 00:49:11 +01:00 • committed by mara
commit 8a0615ccfc

View file

@ -1139,6 +1139,8 @@ async fn classify(
repo,
pr: req.pr.unsigned_abs(),
head_sha: pull.head_sha,
title: pull.title,
description: pull.description,
commits: pull.commits,
diff: pull.diff,
classifications: rules.classifications,
@ -1801,6 +1803,8 @@ mod tests {
.cloned();
Ok(PullForReview {
head_sha: head.unwrap_or_else(|| "abc123".to_owned()),
title: String::new(),
description: String::new(),
commits: Vec::new(),
diff: String::new(),
narrowed: None,