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 e89d7a8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,18 @@ 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);
} else {
content.push(label);
}
}

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

0 comments on commit e89d7a8

Please sign in to comment.