Skip to content

Commit f7b8fc6

Browse files
committed
ODP-5394: Continue PR creation instead of cancelling when there's an error/no changes
1 parent fdfb9ff commit f7b8fc6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/github/pr.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,14 @@ impl GithubClient {
247247
// Keep track of which PR number belongs to which repository
248248
let mut pr_map: HashMap<String, u64> = HashMap::new();
249249
let mut errors: Vec<(String, GitError)> = Vec::new();
250-
while let Some(Some((repo, result))) = futures.next().await {
251-
match result {
252-
Ok(pr_number) => {
253-
pr_map.insert(repo.to_string(), pr_number);
250+
while let Some(res) = futures.next().await {
251+
if let Some((repo, result)) = res {
252+
match result {
253+
Ok(pr_number) => {
254+
pr_map.insert(repo.to_string(), pr_number);
255+
}
256+
Err(e) => errors.push((repo.to_string(), e)),
254257
}
255-
Err(e) => errors.push((repo.to_string(), e)),
256258
}
257259
}
258260
if !errors.is_empty() {

0 commit comments

Comments
 (0)