mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2025-03-14 05:05:55 +01:00
fix: remove argument ids with special characters
This commit is contained in:
parent
a58080e872
commit
3bc1c07659
4 changed files with 4 additions and 25 deletions
|
@ -25,27 +25,24 @@ pub enum IssueSubcommand {
|
|||
title: Option<String>,
|
||||
#[clap(long)]
|
||||
body: Option<String>,
|
||||
#[clap(long, short, id = "[HOST/]OWNER/REPO")]
|
||||
#[clap(long, short)]
|
||||
repo: Option<RepoArg>,
|
||||
#[clap(long)]
|
||||
web: bool,
|
||||
},
|
||||
/// Edit an issue
|
||||
Edit {
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
issue: IssueId,
|
||||
#[clap(subcommand)]
|
||||
command: EditCommand,
|
||||
},
|
||||
/// Add a comment on an issue
|
||||
Comment {
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
issue: IssueId,
|
||||
body: Option<String>,
|
||||
},
|
||||
/// Close an issue
|
||||
Close {
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
issue: IssueId,
|
||||
/// A comment to leave on the issue before closing it
|
||||
#[clap(long, short)]
|
||||
|
@ -53,7 +50,7 @@ pub enum IssueSubcommand {
|
|||
},
|
||||
/// Search for an issue in a repo
|
||||
Search {
|
||||
#[clap(long, short, id = "[HOST/]OWNER/REPO")]
|
||||
#[clap(long, short)]
|
||||
repo: Option<RepoArg>,
|
||||
query: Option<String>,
|
||||
#[clap(long, short)]
|
||||
|
@ -67,14 +64,12 @@ pub enum IssueSubcommand {
|
|||
},
|
||||
/// View an issue's info
|
||||
View {
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
id: IssueId,
|
||||
#[clap(subcommand)]
|
||||
command: Option<ViewCommand>,
|
||||
},
|
||||
/// Open an issue in your browser
|
||||
Browse {
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
id: IssueId,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ pub enum PrSubcommand {
|
|||
#[clap(long)]
|
||||
body: Option<String>,
|
||||
/// The repo to create this issue on
|
||||
#[clap(long, short, id = "[HOST/]OWNER/REPO")]
|
||||
#[clap(long, short)]
|
||||
repo: Option<RepoArg>,
|
||||
/// Open the PR creation menu in your web browser
|
||||
#[clap(short, long, group = "web-or-cmd", group = "web-or-agit")]
|
||||
|
@ -73,7 +73,6 @@ pub enum PrSubcommand {
|
|||
/// View the contents of a pull request
|
||||
View {
|
||||
/// The pull request to view.
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
id: Option<IssueId>,
|
||||
#[clap(subcommand)]
|
||||
command: Option<ViewCommand>,
|
||||
|
@ -81,7 +80,6 @@ pub enum PrSubcommand {
|
|||
/// View the mergability and CI status of a pull request
|
||||
Status {
|
||||
/// The pull request to view.
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
id: Option<IssueId>,
|
||||
/// Wait for all checks to finish before exiting
|
||||
#[clap(long)]
|
||||
|
@ -103,7 +101,6 @@ pub enum PrSubcommand {
|
|||
/// Add a comment on a pull request
|
||||
Comment {
|
||||
/// The pull request to comment on.
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
pr: Option<IssueId>,
|
||||
/// The text content of the comment.
|
||||
///
|
||||
|
@ -113,7 +110,6 @@ pub enum PrSubcommand {
|
|||
/// Edit the contents of a pull request
|
||||
Edit {
|
||||
/// The pull request to edit.
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
pr: Option<IssueId>,
|
||||
#[clap(subcommand)]
|
||||
command: EditCommand,
|
||||
|
@ -121,7 +117,6 @@ pub enum PrSubcommand {
|
|||
/// Close a pull request, without merging.
|
||||
Close {
|
||||
/// The pull request to close.
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
pr: Option<IssueId>,
|
||||
/// A comment to add before closing.
|
||||
///
|
||||
|
@ -132,7 +127,6 @@ pub enum PrSubcommand {
|
|||
/// Merge a pull request
|
||||
Merge {
|
||||
/// The pull request to merge.
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
pr: Option<IssueId>,
|
||||
/// The merge style to use.
|
||||
#[clap(long, short = 'M')]
|
||||
|
@ -150,7 +144,6 @@ pub enum PrSubcommand {
|
|||
/// Open a pull request in your browser
|
||||
Browse {
|
||||
/// The pull request to open in your browser.
|
||||
#[clap(id = "[REPO#]ID")]
|
||||
id: Option<IssueId>,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ pub struct ReleaseCommand {
|
|||
#[clap(long, short = 'R')]
|
||||
remote: Option<String>,
|
||||
/// The name of the repository to operate on.
|
||||
#[clap(long, short, id = "[HOST/]OWNER/REPO")]
|
||||
#[clap(long, short)]
|
||||
repo: Option<RepoArg>,
|
||||
#[clap(subcommand)]
|
||||
command: ReleaseSubcommand,
|
||||
|
|
|
@ -330,7 +330,6 @@ pub enum RepoCommand {
|
|||
},
|
||||
/// Fork a repository onto your account
|
||||
Fork {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
repo: RepoArg,
|
||||
#[clap(long)]
|
||||
name: Option<String>,
|
||||
|
@ -339,7 +338,6 @@ pub enum RepoCommand {
|
|||
},
|
||||
Migrate {
|
||||
/// URL of the repo to migrate
|
||||
#[clap(id = "HOST/OWNER/REPO")]
|
||||
repo: String,
|
||||
/// Name of the new mirror
|
||||
name: String,
|
||||
|
@ -376,44 +374,37 @@ pub enum RepoCommand {
|
|||
},
|
||||
/// View a repo's info
|
||||
View {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
name: Option<RepoArg>,
|
||||
#[clap(long, short = 'R')]
|
||||
remote: Option<String>,
|
||||
},
|
||||
/// View a repo's README
|
||||
Readme {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
name: Option<RepoArg>,
|
||||
#[clap(long, short = 'R')]
|
||||
remote: Option<String>,
|
||||
},
|
||||
/// Clone a repo's code locally
|
||||
Clone {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
repo: RepoArg,
|
||||
path: Option<PathBuf>,
|
||||
},
|
||||
/// Add a star to a repo
|
||||
Star {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
repo: RepoArg,
|
||||
},
|
||||
/// Take away a star from a repo
|
||||
Unstar {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
repo: RepoArg,
|
||||
},
|
||||
/// Delete a repository
|
||||
///
|
||||
/// This cannot be undone!
|
||||
Delete {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
repo: RepoArg,
|
||||
},
|
||||
/// Open a repository's page in your browser
|
||||
Browse {
|
||||
#[clap(id = "[HOST/]OWNER/REPO")]
|
||||
name: Option<RepoArg>,
|
||||
#[clap(long, short = 'R')]
|
||||
remote: Option<String>,
|
||||
|
|
Loading…
Add table
Reference in a new issue