release_kit/cli/adopt.rs
1//! Arguments for `rk adopt`.
2
3use camino::Utf8PathBuf;
4use clap::Args;
5
6/// Write the landing record for a repository that already runs the
7/// convention, landed before the record existed.
8///
9/// Strict: every rendered file must match what this payload would
10/// render, and no target file is ever changed.
11#[derive(Debug, Args)]
12pub struct AdoptArgs {
13 /// The repository to adopt.
14 #[arg(long, default_value = ".")]
15 pub target: Utf8PathBuf,
16
17 /// The technology whose payload the target runs. Defaults to
18 /// detection from the version file.
19 #[arg(long)]
20 pub tech: Option<String>,
21
22 /// The forge whose payload the target runs: github or gitlab.
23 /// Defaults to detection from the target's git remote.
24 #[arg(long)]
25 pub forge: Option<String>,
26
27 /// The project path on the forge, the parameter the candidate is
28 /// rendered under. Defaults to detection from the target's git
29 /// remote.
30 #[arg(long)]
31 pub repo: Option<String>,
32
33 /// The Conventional Commit scopes this project accepts,
34 /// comma-separated, the parameter the candidate is rendered under and
35 /// the record carries. There is no record to read it from yet, so the
36 /// adoption refuses without it.
37 #[arg(long)]
38 pub scopes: Option<String>,
39
40 /// Write the record; without it the verification runs and nothing is
41 /// touched.
42 #[arg(long)]
43 pub apply: bool,
44
45 /// Emit one JSON object on stdout instead of the human report.
46 #[arg(long)]
47 pub json: bool,
48}