Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
feat: make cibool trigger --ref be preferred over --name
Merged liw opened 1 year ago

feat: cibtool trigger –ref defaults to main, –commit to HEAD

2 files changed +3 -3 b33aae59 daed76ff
modified ci-broker.md
@@ -1701,7 +1701,7 @@ export SRCDIR="$CARGO_MANIFEST_DIR"

	# Trigger a CI run. Hide the event ID that cibtool writes to
    # stdout.
-
	cargo run -q --bin cibtool -- --db "$db" trigger --repo "$REPO" --name main --commit HEAD >/dev/null
+
	cargo run -q --bin cibtool -- --db "$db" trigger --repo "$REPO" --ref main --commit HEAD >/dev/null

	# Run CI on queued events.
	cargo run -q --bin cib -- --config "$config" queued
modified src/bin/cibtoolcmd/trigger.rs
@@ -9,13 +9,13 @@ pub struct TriggerCmd {
    repo: String,

    /// Set the name of the ref the event refers to.
-
    #[clap(long, alias = "ref")]
+
    #[clap(long = "ref", aliases = ["name"], default_value = "main")]
    name: String,

    /// Set the commit the event refers to. Can be the SHA1 commit id,
    /// or a symbolic Git revision, as understood by `git rev-parse`.
    /// For example, `HEAD`.
-
    #[clap(long)]
+
    #[clap(long, default_value = "HEAD")]
    commit: String,

    /// Write the event ID to this file, after adding the event to the