Skip to content

Commit

Permalink
Use citadel-trunk use case for mobile if on proper schedule types
Browse files Browse the repository at this point in the history
Summary: "schedule_type" here is not necessary from job.. there's [more complex logic](https://fburl.com/code/7w0ri28k) to determine which "schedule type" to trigger job with.. I think we should be good to use "citadel-trunk" for all those trunk schedule types.

Differential Revision: D58769678

fbshipit-source-id: 5db66c5169dee2b36406c2d138ee7872ff807555
  • Loading branch information
Xiang Gao authored and facebook-github-bot committed Jun 20, 2024
1 parent 8b921e9 commit b94ec01
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions td_util/src/schedules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ lazy_static! {
ScheduleType::Postcommit,
ScheduleType::Relbranch,
]);
static ref TRUNK_SCHEDULE_TYPES: HashSet<ScheduleType> = HashSet::from([
ScheduleType::Continuous,
ScheduleType::ContinuousStable,
ScheduleType::Testwarden,
ScheduleType::Greenwarden,
ScheduleType::Disabled,
]);
}

#[derive(
Expand Down Expand Up @@ -66,6 +73,10 @@ impl ScheduleType {
pub fn is_changeset_schedule_type(&self) -> bool {
CHANGESET_SCHEDULE_TYPES.contains(self)
}

pub fn is_trunk_schedule_type(&self) -> bool {
TRUNK_SCHEDULE_TYPES.contains(self)
}
}

#[derive(
Expand Down

0 comments on commit b94ec01

Please sign in to comment.