Skip to content

Commit

Permalink
feat(update_backlog): add demote and sync verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Nov 27, 2024
1 parent 3a3f61d commit 09ad17c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion moz-webgpu-cts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,22 @@ enum OnZeroItem {
enum UpdateBacklogDirection {
/// Allows promotions from `backlog` to `implementing`.
Promote,
Demote,
Sync,
}

impl UpdateBacklogDirection {
pub fn can_promote(self) -> bool {
match self {
Self::Promote => true,
Self::Promote | Self::Sync => true,
Self::Demote => false,
}
}

pub fn can_demote(self) -> bool {
match self {
Self::Demote | Self::Sync => true,
Self::Promote => false,
}
}
}
Expand Down Expand Up @@ -1083,6 +1093,9 @@ fn run(cli: Cli) -> ExitCode {
Case::PermaPass if direction.can_promote() => {
Some(ImplementationStatus::Implementing)
}
Case::Other if direction.can_demote() => {
Some(ImplementationStatus::Backlog)
}
_ => None,
}
}
Expand Down

0 comments on commit 09ad17c

Please sign in to comment.