|
1 | | -use crate::bors::command::{Approver, BorsCommand, RollupMode}; |
2 | 1 | use crate::bors::Comment; |
3 | 2 | use crate::bors::RepositoryState; |
| 3 | +use crate::bors::command::{Approver, BorsCommand, RollupMode}; |
4 | 4 | use crate::github::PullRequest; |
5 | 5 | use std::sync::Arc; |
6 | 6 |
|
@@ -49,45 +49,35 @@ pub(super) async fn command_help( |
49 | 49 | fn get_command_help(command: BorsCommand) -> String { |
50 | 50 | // !!! When modifying this match, also update the command list above (in [`command_help`]) !!! |
51 | 51 | let help = match command { |
52 | | - BorsCommand::Approve { approver: Approver::Myself, .. } => { |
| 52 | + BorsCommand::Approve { |
| 53 | + approver: Approver::Myself, |
| 54 | + .. |
| 55 | + } => { |
53 | 56 | "`r+ [p=<priority>] [rollup=<never/iffy/maybe/always>]`: Approve this PR. Optionally, you can specify `<priority>`, `<rollup>`." |
54 | 57 | } |
55 | | - BorsCommand::Approve {approver: Approver::Specified(_), ..} => { |
| 58 | + BorsCommand::Approve { |
| 59 | + approver: Approver::Specified(_), |
| 60 | + .. |
| 61 | + } => { |
56 | 62 | "`r=<user> [p=<priority>]`: Approve this PR on behalf of `<user>`. Optionally, you can specify a `<priority>`." |
57 | 63 | } |
58 | | - BorsCommand::Unapprove => { |
59 | | - "`r-`: Unapprove this PR" |
60 | | - } |
61 | | - BorsCommand::SetPriority(_) => { |
62 | | - "`p=<priority>`: Set the priority of this PR" |
63 | | - } |
64 | | - BorsCommand::Delegate => { |
65 | | - "`delegate+`: Delegate approval authority to the PR author" |
66 | | - } |
67 | | - BorsCommand::Undelegate => { |
68 | | - "`delegate-`: Remove any previously granted delegation" |
69 | | - } |
70 | | - BorsCommand::Help => { |
71 | | - "`help`: Print this help message" |
72 | | - } |
73 | | - BorsCommand::Ping => { |
74 | | - "`ping`: Check if the bot is alive" |
75 | | - } |
| 64 | + BorsCommand::Unapprove => "`r-`: Unapprove this PR", |
| 65 | + BorsCommand::SetPriority(_) => "`p=<priority>`: Set the priority of this PR", |
| 66 | + BorsCommand::Delegate => "`delegate+`: Delegate approval authority to the PR author", |
| 67 | + BorsCommand::Undelegate => "`delegate-`: Remove any previously granted delegation", |
| 68 | + BorsCommand::Help => "`help`: Print this help message", |
| 69 | + BorsCommand::Ping => "`ping`: Check if the bot is alive", |
76 | 70 | BorsCommand::Try { .. } => { |
77 | 71 | "`try [parent=<parent>] [jobs=<jobs>]`: Start a try build. Optionally, you can specify a `<parent>` SHA or a list of `<jobs>` to run" |
78 | 72 | } |
79 | | - BorsCommand::TryCancel => { |
80 | | - "`try cancel`: Cancel a running try build" |
81 | | - } |
| 73 | + BorsCommand::TryCancel => "`try cancel`: Cancel a running try build", |
82 | 74 | BorsCommand::SetRollupMode(_) => { |
83 | 75 | "`rollup=<never/iffy/maybe/always>`: Mark the rollup status of the PR" |
84 | 76 | } |
85 | 77 | BorsCommand::Info => { |
86 | | - "`info`: Get information about the current PR including delegation, priority, merge status, and try build status" |
87 | | - } |
88 | | - BorsCommand::OpenTree => { |
89 | | - "`treeclosed-`: Open the repository tree for merging" |
| 78 | + "`info`: Get information about the current PR including delegation, priority, merge status, and try build status" |
90 | 79 | } |
| 80 | + BorsCommand::OpenTree => "`treeclosed-`: Open the repository tree for merging", |
91 | 81 | BorsCommand::TreeClosed(_) => { |
92 | 82 | "`treeclosed=<priority>`: Close the tree for PRs with priority less than `<priority>`" |
93 | 83 | } |
|
0 commit comments