xtask/cmd/change_logs/
mod.rs

1use anyhow::Context;
2
3mod check_pr;
4mod generate;
5mod util;
6
7#[derive(Debug, Clone, clap::Subcommand)]
8pub enum Commands {
9    Generate(generate::Generate),
10    CheckPr(check_pr::CheckPr),
11}
12
13impl Commands {
14    pub fn run(self) -> anyhow::Result<()> {
15        match self {
16            Commands::Generate(cmd) => cmd.run().context("generate change logs"),
17            Commands::CheckPr(cmd) => cmd.run().context("check pr"),
18        }
19    }
20}