Skip to content

Commit

Permalink
Avoid double-pinging Zulip when opening a MCP
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Jun 29, 2020
1 parent 60f6f91 commit 08e7618
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/handlers/major_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ impl Handler for MajorChangeHandler {
{
return Ok(Some(Invocation::AcceptedProposal));
} else {
return Ok(Some(Invocation::NewProposal));
// Opening an issue with a label assigned triggers both
// "Opened" and "labeled" events.
if e.action == github::IssuesAction::Opened
|| e.action == github::IssuesAction::Reopened
{
return Ok(Some(Invocation::NewProposal));
} else {
// Nothing to do, issue was labeled, but not marked
// as accepted
return Ok(None);
}
}
}
}
Expand Down

0 comments on commit 08e7618

Please sign in to comment.