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:
parent
90a1e523fb
commit
8a0615ccfc
1 changed files with 114 additions and 27 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue