Only update title when a single PR is found
@@ -579,6 +579,7 @@ impl RFDUpdateAction for UpdatePullRequest {
..
} = ctx;
+ if pull_requests.len() == 1 {
if let Some(pull_request) = pull_requests.iter().next() {
// Let's make sure the title of the pull request is what it should be.
// The pull request title should be equal to the name of the pull request.
@@ -638,6 +639,12 @@ impl RFDUpdateAction for UpdatePullRequest {
.await
.map_err(RFDUpdateActionErr::Continue)?;
}
+ } else {
+ info!(
+ "Found multiple pull requests for RFD {}. Unable to update title",
+ rfd.number
+ );
+ }
Ok(RFDUpdateActionResponse::default())
}
