Skip to main content

RepoCommand

Enum RepoCommand 

Source
pub enum RepoCommand {
    View {
        owner_repo: Option<String>,
        web: bool,
        json: Option<Vec<String>>,
        hostname: Option<String>,
    },
    List {
        owner: Option<String>,
        visibility: String,
        fork: String,
        language: Option<String>,
        limit: u32,
        json: Option<Vec<String>>,
        hostname: Option<String>,
    },
    Clone {
        owner_repo: String,
        directory: Option<String>,
        upstream_remote_name: String,
        hostname: Option<String>,
    },
    Create {
        name: String,
        description: Option<String>,
        private: bool,
        internal: bool,
        org: Option<String>,
        template: Option<String>,
        clone: bool,
        remote: String,
        push: bool,
        disable_wiki: bool,
        disable_issues: bool,
        hostname: Option<String>,
    },
    Fork {
        owner_repo: String,
        org: Option<String>,
        clone: bool,
        remote: String,
        fork_name: Option<String>,
        hostname: Option<String>,
    },
    Delete {
        owner_repo: String,
        yes: bool,
        hostname: Option<String>,
    },
    Edit {
        repo: Option<String>,
        description: Option<String>,
        visibility: Option<String>,
        add_topic: Vec<String>,
        remove_topic: Vec<String>,
        default_branch: Option<String>,
        enable_wiki: Option<String>,
        enable_issues: Option<String>,
        enable_projects: Option<String>,
        hostname: Option<String>,
    },
    Transfer {
        target: String,
        repo: Option<String>,
        new_name: Option<String>,
        team: Vec<String>,
        yes: bool,
        hostname: Option<String>,
    },
    Sync {
        repo: Option<String>,
        branch: Option<String>,
        hostname: Option<String>,
    },
}
Expand description

Subcommands for gor repo.

Variants§

§

View

View a repository’s description, stats, and metadata.

Fields

§owner_repo: Option<String>

Repository to view (OWNER/REPO format). Auto-detected from git remote if omitted.

§web: bool

Open the repository in the default browser.

§json: Option<Vec<String>>

Output as JSON. Optionally specify comma-separated field names.

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

List

List repositories for a user or organization.

Fields

§owner: Option<String>

Owner to list repos for (username or org). Defaults to authenticated user.

§visibility: String

Filter by visibility: public, private, or all (default: all).

§fork: String

Filter by fork status: include, exclude, or only (default: include).

§language: Option<String>

Filter by primary language.

§limit: u32

Maximum number of repos to show (default: 30).

§json: Option<Vec<String>>

Output as JSON. Optionally specify comma-separated field names.

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

Clone

Clone a repository locally.

Fields

§owner_repo: String

Repository to clone (OWNER/REPO format or full URL).

§directory: Option<String>

Target directory name.

§upstream_remote_name: String

Name of the upstream remote (default: upstream).

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

Create

Create a repository.

Fields

§name: String

Repository name.

§description: Option<String>

Repository description.

§private: bool

Create a private repository.

§internal: bool

Create an internal repository (GHES only).

§org: Option<String>

Organization to create the repository under.

§template: Option<String>

Template repository (OWNER/REPO).

§clone: bool

Clone the new repository locally after creation.

§remote: String

Remote name when cloning (default: origin).

§push: bool

Push local content to the new repository.

§disable_wiki: bool

Disable the wiki.

§disable_issues: bool

Disable the issue tracker.

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

Fork

Fork a repository.

Fields

§owner_repo: String

Repository to fork (OWNER/REPO format).

§org: Option<String>

Organization to fork into.

§clone: bool

Clone the fork locally after creation.

§remote: String

Remote name when cloning (default: origin).

§fork_name: Option<String>

Custom name for the fork.

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

Delete

Delete a repository.

Fields

§owner_repo: String

Repository to delete (OWNER/REPO format).

§yes: bool

Skip confirmation prompt.

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

Edit

Edit a repository’s settings.

Fields

§repo: Option<String>

Repository to edit (OWNER/REPO format). Auto-detected from git remote if omitted.

§description: Option<String>

Repository description.

§visibility: Option<String>

Repository visibility: public, private, or internal.

§add_topic: Vec<String>

Add a topic (repeatable).

§remove_topic: Vec<String>

Remove a topic (repeatable).

§default_branch: Option<String>

Default branch name.

§enable_wiki: Option<String>

Enable wiki (true/false).

§enable_issues: Option<String>

Enable issues (true/false).

§enable_projects: Option<String>

Enable projects (true/false).

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

Transfer

Transfer a repository to another user or organization.

Fields

§target: String

Target user or organization.

§repo: Option<String>

Repository to transfer (OWNER/REPO format). Auto-detected from git remote if omitted.

§new_name: Option<String>

New name for the repository after transfer.

§team: Vec<String>

Team slug to grant access in the new organization (repeatable).

§yes: bool

Skip confirmation prompt.

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

§

Sync

Sync a fork with its upstream repository.

Fields

§repo: Option<String>

Repository to sync (OWNER/REPO format). Auto-detected from git remote if omitted.

§branch: Option<String>

Branch to sync into (default: the fork’s default branch).

§hostname: Option<String>

GitHub hostname for GitHub Enterprise Server (default: github.com).

Trait Implementations§

Source§

impl Debug for RepoCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for RepoCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for RepoCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more