Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 24 additions & 13 deletions src/bors/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ pub enum SquashCommitMessage {
Explicit(String),
}

#[derive(Debug, PartialEq)]
pub struct ApproveInfo {
/// Who is approving the commit.
pub approver: Approver,
/// Priority of the commit.
pub priority: Option<Priority>,
/// Rollup status of the commit.
pub rollup: Option<RollupMode>,
/// Optional note attached at the end of the command.
pub note: Option<String>,
/// Approve immediately without waiting for PR CI.
pub force: bool,
}

/// Bors command specified by a user.
///
/// When modifying commands, remember to also update:
Expand All @@ -118,18 +132,7 @@ pub enum SquashCommitMessage {
#[derive(Debug, PartialEq)]
pub enum BorsCommand {
/// Approve a commit.
Approve {
/// Who is approving the commit.
approver: Approver,
/// Priority of the commit.
priority: Option<Priority>,
/// Rollup status of the commit.
rollup: Option<RollupMode>,
/// Optional note attached at the end of the command.
note: Option<String>,
/// Approve immediately without waiting for PR CI.
force: bool,
},
Approve(ApproveInfo),
/// Unapprove a commit.
Unapprove,
/// Print help.
Expand Down Expand Up @@ -176,5 +179,13 @@ pub enum BorsCommand {
/// Cancel an auto build currently running on a given PR (without removing it from the queue).
Cancel,
/// Squash all commits of a pull request into a single commit.
Squash { commit_message: SquashCommitMessage },
Squash {
/// Squash message for the commit
commit_message: SquashCommitMessage,
},
SquashApprove {
/// Squash message for the commit
commit_message: SquashCommitMessage,
approval_info: ApproveInfo,
},
}
Loading
Loading