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 Conventional Commit the landed
22 /// guards admit, scoped wherever the record names a release. Required
23 /// for a local integration under the squash merge form, and refused
24 /// under rebase, where every commit of the branch keeps its own
25 /// message.
26 #[arg(long, short = 'm', value_name = "TEXT")]
27 pub message: Option<String>,
28
29 /// Integrate locally for this one execution, whatever the record
30 /// says. It writes no record and changes no landed byte.
31 #[arg(long, conflicts_with = "forge")]
32 pub local: bool,
33
34 /// Integrate at the forge for this one execution, whatever the
35 /// record says.
36 #[arg(long, conflicts_with = "local")]
37 pub forge: bool,
38
39 /// Perform the integration. Without it the command reports what it
40 /// would do and writes nothing.
41 #[arg(long)]
42 pub apply: bool,
43
44 /// Emit one JSON object on stdout instead of the human report.
45 #[arg(long)]
46 pub json: bool,
47}