Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CmdAddComment = cli.Command{ Name: "comment", Aliases: []string{"c"}, Category: catEntities, Usage: "Add a comment to an issue / pr", Description: "Add a comment to an issue / pr", ArgsUsage: "<issue / pr index> [<comment body>]", Action: runAddComment, Flags: flags.AllDefaultFlags, }
CmdAddComment is the main command to operate with notifications
var CmdAdmin = cli.Command{ Name: "admin", Usage: "Operations requiring admin access on the Gitea instance", Aliases: []string{"a"}, Category: catMisc, Action: func(cmd *cli.Context) error { return cli.ShowSubcommandHelp(cmd) }, Subcommands: []*cli.Command{ &cmdAdminUsers, }, }
CmdAdmin represents the namespace of admin commands. The command itself has no functionality, but hosts subcommands.
var CmdAutocomplete = cli.Command{ Name: "shellcompletion", Aliases: []string{"autocomplete"}, Category: catSetup, Usage: "Install shell completion for tea", Description: "Install shell completion for tea", ArgsUsage: "<shell type> (bash, zsh, powershell, fish)", Flags: []cli.Flag{ &cli.BoolFlag{ Name: "install", Usage: "Persist in shell config instead of printing commands", }, }, Action: runAutocompleteAdd, }
CmdAutocomplete manages autocompletion
var CmdIssues = cli.Command{ Name: "issues", Aliases: []string{"issue", "i"}, Category: catEntities, Usage: "List, create and update issues", Description: `Lists issues when called without argument. If issue index is provided, will show it in detail.`, ArgsUsage: "[<issue index>]", Action: runIssues, Subcommands: []*cli.Command{ &issues.CmdIssuesList, &issues.CmdIssuesCreate, &issues.CmdIssuesReopen, &issues.CmdIssuesClose, }, Flags: append([]cli.Flag{ &cli.BoolFlag{ Name: "comments", Usage: "Whether to display comments (will prompt if not provided & run interactively)", }, }, issues.CmdIssuesList.Flags...), }
CmdIssues represents to login a gitea server.
var CmdLabels = cli.Command{ Name: "labels", Aliases: []string{"label"}, Category: catEntities, Usage: "Manage issue labels", Description: `Manage issue labels`, ArgsUsage: " ", Action: runLabels, Subcommands: []*cli.Command{ &labels.CmdLabelsList, &labels.CmdLabelCreate, &labels.CmdLabelUpdate, &labels.CmdLabelDelete, }, Flags: labels.CmdLabelsList.Flags, }
CmdLabels represents to operate repositories' labels.
var CmdLogin = cli.Command{ Name: "logins", Aliases: []string{"login"}, Category: catSetup, Usage: "Log in to a Gitea server", Description: `Log in to a Gitea server`, ArgsUsage: "[<login name>]", Action: runLogins, Subcommands: []*cli.Command{ &login.CmdLoginList, &login.CmdLoginAdd, &login.CmdLoginEdit, &login.CmdLoginDelete, &login.CmdLoginSetDefault, }, }
CmdLogin represents to login a gitea server.
var CmdLogout = cli.Command{ Name: "logout", Category: catSetup, Usage: "Log out from a Gitea server", Description: `Log out from a Gitea server`, ArgsUsage: "<login name>", Action: login.RunLoginDelete, }
CmdLogout represents to logout a gitea server.
var CmdMilestones = cli.Command{ Name: "milestones", Aliases: []string{"milestone", "ms"}, Category: catEntities, Usage: "List and create milestones", Description: `List and create milestones`, ArgsUsage: "[<milestone name>]", Action: runMilestones, Subcommands: []*cli.Command{ &milestones.CmdMilestonesList, &milestones.CmdMilestonesCreate, &milestones.CmdMilestonesClose, &milestones.CmdMilestonesDelete, &milestones.CmdMilestonesReopen, &milestones.CmdMilestonesIssues, }, Flags: milestones.CmdMilestonesList.Flags, }
CmdMilestones represents to operate repositories milestones.
var CmdNotifications = cli.Command{ Name: "notifications", Aliases: []string{"notification", "n"}, Category: catHelpers, Usage: "Show notifications", Description: "Show notifications, by default based on the current repo if available", Action: notifications.RunNotificationsList, Subcommands: []*cli.Command{ ¬ifications.CmdNotificationsList, ¬ifications.CmdNotificationsMarkRead, ¬ifications.CmdNotificationsMarkUnread, ¬ifications.CmdNotificationsMarkPinned, ¬ifications.CmdNotificationsUnpin, }, Flags: notifications.CmdNotificationsList.Flags, }
CmdNotifications is the main command to operate with notifications
var CmdOpen = cli.Command{ Name: "open", Aliases: []string{"o"}, Category: catHelpers, Usage: "Open something of the repository in web browser", Description: `Open something of the repository in web browser`, Action: runOpen, Flags: append([]cli.Flag{}, flags.LoginRepoFlags...), }
CmdOpen represents a sub command of issues to open issue on the web browser
var CmdOrgs = cli.Command{ Name: "organizations", Aliases: []string{"organization", "org"}, Category: catEntities, Usage: "List, create, delete organizations", Description: "Show organization details", ArgsUsage: "[<organization>]", Action: runOrganizations, Subcommands: []*cli.Command{ &organizations.CmdOrganizationList, &organizations.CmdOrganizationCreate, &organizations.CmdOrganizationDelete, }, Flags: organizations.CmdOrganizationList.Flags, }
CmdOrgs represents handle organization
var CmdPulls = cli.Command{ Name: "pulls", Aliases: []string{"pull", "pr"}, Category: catEntities, Usage: "Manage and checkout pull requests", Description: `Lists PRs when called without argument. If PR index is provided, will show it in detail.`, ArgsUsage: "[<pull index>]", Action: runPulls, Flags: append([]cli.Flag{ &cli.BoolFlag{ Name: "comments", Usage: "Whether to display comments (will prompt if not provided & run interactively)", }, }, pulls.CmdPullsList.Flags...), Subcommands: []*cli.Command{ &pulls.CmdPullsList, &pulls.CmdPullsCheckout, &pulls.CmdPullsClean, &pulls.CmdPullsCreate, &pulls.CmdPullsClose, &pulls.CmdPullsReopen, &pulls.CmdPullsReview, &pulls.CmdPullsApprove, &pulls.CmdPullsReject, &pulls.CmdPullsMerge, }, }
CmdPulls is the main command to operate on PRs
var CmdReleases = cli.Command{ Name: "releases", Aliases: []string{"release", "r"}, Category: catEntities, Usage: "Manage releases", Description: "Manage releases", ArgsUsage: " ", Action: releases.RunReleasesList, Subcommands: []*cli.Command{ &releases.CmdReleaseList, &releases.CmdReleaseCreate, &releases.CmdReleaseDelete, &releases.CmdReleaseEdit, }, Flags: flags.AllDefaultFlags, }
CmdReleases represents to login a gitea server. ToDo: ReleaseDetails
var CmdRepoClone = cli.Command{ Name: "clone", Aliases: []string{"C"}, Usage: "Clone a repository locally", Description: `Clone a repository locally, without a local git installation required. The repo slug can be specified in different formats: gitea/tea tea gitea.com/gitea/tea git@gitea.com:gitea/tea https://gitea.com/gitea/tea ssh://gitea.com:22/gitea/tea When a host is specified in the repo-slug, it will override the login specified with --login. `, Category: catHelpers, Action: runRepoClone, ArgsUsage: "<repo-slug> [target dir]", Flags: []cli.Flag{ &cli.IntFlag{ Name: "depth", Aliases: []string{"d"}, Usage: "num commits to fetch, defaults to all", }, &flags.LoginFlag, }, }
CmdRepoClone represents a sub command of repos to create a local copy
var CmdRepos = cli.Command{ Name: "repos", Aliases: []string{"repo"}, Category: catEntities, Usage: "Show repository details", Description: "Show repository details", ArgsUsage: "[<repo owner>/<repo name>]", Action: runRepos, Subcommands: []*cli.Command{ &repos.CmdReposList, &repos.CmdReposSearch, &repos.CmdRepoCreate, &repos.CmdRepoCreateFromTemplate, &repos.CmdRepoFork, }, Flags: repos.CmdReposListFlags, }
CmdRepos represents to login a gitea server.
var CmdTrackedTimes = cli.Command{ Name: "times", Aliases: []string{"time", "t"}, Category: catEntities, Usage: "Operate on tracked times of a repository's issues & pulls", Description: `Operate on tracked times of a repository's issues & pulls. Depending on your permissions on the repository, only your own tracked times might be listed.`, ArgsUsage: "[username | #issue]", Action: times.RunTimesList, Subcommands: []*cli.Command{ ×.CmdTrackedTimesAdd, ×.CmdTrackedTimesDelete, ×.CmdTrackedTimesReset, ×.CmdTrackedTimesList, }, Flags: times.CmdTrackedTimesList.Flags, }
CmdTrackedTimes represents the command to operate repositories' times.
var CmdWhoami = cli.Command{ Name: "whoami", Category: catMisc, Description: `For debugging purposes, show the user that is currently logged in.`, Usage: "Show current logged in user", ArgsUsage: " ", Action: func(cmd *cli.Context) error { ctx := context.InitCommand(cmd) client := ctx.Login.Client() user, _, _ := client.GetMyUserInfo() print.UserDetails(user) return nil }, }
CmdWhoami represents the command to show current logged in user
Functions ¶
This section is empty.
Types ¶
This section is empty.