@@ -2,6 +2,7 @@ use std::fmt::Display;
22
33use crate :: errors:: user_error;
44use crate :: jobs:: Job ;
5+ use crate :: utils:: is_issue_under_rfcbot_fcp;
56use crate :: zulip:: api:: Recipient ;
67use crate :: {
78 config:: MajorChangeConfig ,
@@ -262,6 +263,13 @@ pub(super) async fn handle_command(
262263 return user_error ! ( "Only team members can second issues." ) ;
263264 }
264265
266+ // Verify that this issue isn't a rfcbot FCP
267+ if is_issue_under_rfcbot_fcp ( & issue. repository ( ) . full_repo_name ( ) , issue. number ) . await {
268+ return user_error ! (
269+ "Cannot second a major change on an active [rfcbot](https://rfcbot.rs/) FCP."
270+ ) ;
271+ }
272+
265273 let has_concerns = if let Some ( concerns_label) = & config. concerns_label {
266274 issue. labels ( ) . iter ( ) . any ( |l| & l. name == concerns_label)
267275 } else {
@@ -474,6 +482,7 @@ enum SecondedLogicError {
474482 at : DateTime < Utc > ,
475483 } ,
476484 NoMajorChangeConfig ,
485+ UnderRfcBotFcp ,
477486}
478487
479488impl std:: error:: Error for SecondedLogicError { }
@@ -506,6 +515,7 @@ impl Display for SecondedLogicError {
506515 write ! ( f, "concerns label added at {at}" )
507516 }
508517 SecondedLogicError :: NoMajorChangeConfig => write ! ( f, "no `[major_change]` config" ) ,
518+ SecondedLogicError :: UnderRfcBotFcp => write ! ( f, "under rfcbot fcp" ) ,
509519 }
510520 }
511521}
@@ -679,6 +689,10 @@ async fn try_accept_mcp(
679689 open: issue. is_open( )
680690 } ) ;
681691 }
692+
693+ if is_issue_under_rfcbot_fcp ( & major_change. repo , major_change. issue ) . await {
694+ anyhow:: bail!( SecondedLogicError :: UnderRfcBotFcp ) ;
695+ }
682696 }
683697
684698 if !issue. labels . iter ( ) . any ( |l| l. name == config. accept_label ) {
0 commit comments