release_kit/cli/integrate.rs
1//! Arguments for `rk integrate`.
2
3use camino::Utf8PathBuf;
4use clap::Args;
5
6/// Move one implementation onto the trunk, through the recorded authority.
7#[derive(Debug, Args)]
8#[expect(
9 clippy::struct_excessive_bools,
10 reason = "each field is one clap flag: the two authority overrides are mutually exclusive by declaration, and the preview and the machine form are the flags every verb here carries"
11)]
12pub struct IntegrateArgs {
13 /// The branch to integrate.
14 pub branch: String,
15
16 /// The target repository.
17 #[arg(long, default_value = ".")]
18 pub target: Utf8PathBuf,
19
20 /// The trunk commit's message. A local integration writes it as the
21 /// squash commit, so it must be a scoped Conventional Commit the
22 /// landed guards admit. Required for a local integration.
23 #[arg(long, short = 'm', value_name = "TEXT")]
24 pub message: Option<String>,
25
26 /// Integrate locally for this one execution, whatever the record
27 /// says. It writes no record and changes no landed byte.
28 #[arg(long, conflicts_with = "forge")]
29 pub local: bool,
30
31 /// Integrate at the forge for this one execution, whatever the
32 /// record says.
33 #[arg(long, conflicts_with = "local")]
34 pub forge: bool,
35
36 /// Perform the integration. Without it the command reports what it
37 /// would do and writes nothing.
38 #[arg(long)]
39 pub apply: bool,
40
41 /// Emit one JSON object on stdout instead of the human report.
42 #[arg(long)]
43 pub json: bool,
44}