diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-13 00:47:01 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-13 00:47:01 -0400 |
commit | 62c07f7e0c3cdfed727622748106d001603dcc51 (patch) | |
tree | 38516a1514e529295128aba354c64ece8db5d65a | |
parent | f463bd4d0926978d10e5a689f8b97040c9b69632 (diff) |
gc-results: update for new branch names
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | src/bin/gc-results.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/bin/gc-results.rs b/src/bin/gc-results.rs index ce81b5e..cf664f9 100644 --- a/src/bin/gc-results.rs +++ b/src/bin/gc-results.rs @@ -48,14 +48,15 @@ fn get_live_commits(rc: &CiConfig) -> HashSet<String> let mut ret: HashSet<String> = HashSet::new(); - for (_, user) in rc.users.iter() { - if let Ok(user) = user { - for (branch, branch_config) in user.branch.iter() { - for test_group in branch_config.tests.iter() { - let max_commits = user.test_group.get(test_group).map(|x| x.max_commits).unwrap_or(0); - for commit in branch_get_commits(&repo, &branch, max_commits) { - ret.insert(commit); - } + for (user, userconfig) in rc.users.iter() + .filter(|u| u.1.is_ok()) + .map(|(user, userconfig)| (user, userconfig.as_ref().unwrap())) { + for (branch, branch_config) in userconfig.branch.iter() { + for test_group in branch_config.tests.iter() { + let max_commits = userconfig.test_group.get(test_group).map(|x| x.max_commits).unwrap_or(0); + let userbranch = user.to_string() + "/" + branch; + for commit in branch_get_commits(&repo, &userbranch, max_commits) { + ret.insert(commit); } } } |