Skip to content

Commit

Permalink
feat: don't put duplicate repos in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
BobrImperator committed Sep 16, 2023
1 parent 020f4ca commit d8e397e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,17 @@ fn write_twios_comment_contents(content: &mut Vec<String>, app_params: &AppParam
content.push(format!("- TWIOS_CATEGORIES {:?}", labels.into_iter().map(|item| item.name.clone()).collect::<Vec<_>>().join(",")));
content.push("- TWIOS_UNLABELLED".to_string());

let mut unknown_labels = HashSet::new();
for item in unknown_items.iter() {
content.push(format!(
let label = format!(
" - [{}] UNKNOWN @{}",
item.full_repository_name,
item.user_login
));
);
if !unknown_labels.contains(&label) {
unknown_labels.insert(label.clone());
content.push(label);
}
}

content.push("".to_string());
Expand Down

0 comments on commit d8e397e

Please sign in to comment.