Skip to content

Commit

Permalink
Merge pull request #1834 from nikomatsakis/fwd-comments-on-tracking-i…
Browse files Browse the repository at this point in the history
…ssues-only

only forward comments on tracking issues to zulip
  • Loading branch information
jackh726 authored Aug 21, 2024
2 parents 0348f74 + db16741 commit 04ca6de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/handlers/project_goals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,17 @@ pub async fn handle(ctx: &Context, event: &Event) -> anyhow::Result<()> {
comment,
..
}) => {
// Only comments on tracking issues should be forwarded to Zulip.
if !issue.labels.iter().any(|l| l.name == C_TRACKING_ISSUE) {
return Ok(());
}

let number = issue.number;
let action_str = match action {
IssueCommentAction::Created => "posted",
IssueCommentAction::Edited => "edited",
IssueCommentAction::Deleted => "deleted",

// Don't spam for updates, deletes
_ => return Ok(()),
};
let zulip_topic_name = zulip_topic_name(issue);
let url = &comment.html_url;
Expand Down

0 comments on commit 04ca6de

Please sign in to comment.