Weave documentation
Rust referenceweave-loom

weave-loom · commands::pr

Source declarations, signatures and documentation for commands::pr.

Source: sigil/weave/tools/loom/src/commands/pr.rs. SHA-256: f3ab45cba91f2d8f9baa796f7d11a6102a7252a4983e56e51c91e999c31d5210.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

commands::pr::PrArgs

Arguments for loom pr.

#[derive(Debug, clap::Args)]
pub struct PrArgs {
/// Subcommand.

#[command(subcommand)]
pub action: PrAction
}

Source line: 26.

commands::pr::PrAction

loom pr <subcommand>.

#[derive(Debug, Subcommand)]
pub enum PrAction {
    /// Open a new pull request from --head into --base.
    Open {
        /// Source branch (the changes you want to merge in).
        #[arg(long)]
        head: String,
        /// Target branch. Defaults to the repo's `default_branch`.
        #[arg(long)]
        base: Option<String>,
        /// One-line title.
        #[arg(short = 'm', long)]
        title: String,
        /// Long-form description (Markdown).
        #[arg(short = 'd', long, default_value = "")]
        description: String,
    },

    /// List every PR in this repo.
    List,

    /// Show one PR plus its approvals.
    Show {
        /// PR id (16-hex prefix).
        id: String,
    },

    /// Sign and persist an approval for the PR's current head commit.
    Approve {
        /// PR id (16-hex prefix).
        id: String,
    },

    /// If the approval threshold is met, run the existing merge primitive
    /// to fold head into base, then mark the PR `merged`.
    Merge {
        /// PR id.
        id: String,
        /// Override the default `MergePolicy::min_approvals = 1`.
        #[arg(long, default_value_t = 1)]
        min_approvals: u32,
        /// Optional commit message; defaults to the PR title.
        #[arg(short, long)]
        message: Option<String>,
    },
}

Source line: 34.

commands::pr::run

Execute loom pr.

pub async fn run(args: PrArgs) -> Result<()>;

Source line: 81.

On this page