Documentation
¶
Index ¶
- func Execute(root *cobra.Command, stderr io.Writer) int
- func ExecuteThen(root *cobra.Command, stderr io.Writer, after func(executed *cobra.Command)) int
- func IsInvalidConfig(err error) bool
- func IsInvalidFlags(err error) bool
- func New(config Config) (*cobra.Command, error)
- type Config
- type UsageError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶ added in v8.91.4
Execute runs root with the process arguments and returns the exit code. An agent-facing command has written its JSON document already: its outcome is the exit code and nothing more is printed. Any other error is printed on stderr for a person: a wrong call with the command's usage line and a pointer to its help, the stack trace only at --log-level debug. An error that knows its exit code (agentcli.ExitCoder, such as [authstore.ErrAuthRequired], exit 8) exits with it; any other exits 2.
func ExecuteThen ¶ added in v8.164.0
ExecuteThen is Execute, and calls after with the command that ran, once it ran and whatever its outcome, before returning the exit code. after cannot change the exit code.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type UsageError ¶ added in v8.91.4
type UsageError struct {
Command *cobra.Command
Err error
// Usage prints the command's usage line under the message; an unknown
// subcommand prints only the pointer to the help, which lists them.
Usage bool
}
UsageError is a command called the wrong way: an argument, a flag or a subcommand it does not take. It is printed with the command's usage line and a pointer to its help, never with a stack trace.
func (*UsageError) Error ¶ added in v8.91.4
func (e *UsageError) Error() string
func (*UsageError) Unwrap ¶ added in v8.91.4
func (e *UsageError) Unwrap() error
Directories
¶
| Path | Synopsis |
|---|---|
|
internal/checks
Package checks reads the independent check sources of the bulk PR commands.
|
Package checks reads the independent check sources of the bulk PR commands. |
|
internal/prcontext
Package prcontext provides interruptible waits for the bulk PR commands.
|
Package prcontext provides interruptible waits for the bulk PR commands. |
|
adopt
Package adopt is `devctl repo adopt`: an existing, undeclared repository declared in a team's file.
|
Package adopt is `devctl repo adopt`: an existing, undeclared repository declared in a team's file. |
|
align
Package align is `devctl repo align`: Align now for one repository, through the reconciler, in the mode its team-file entry decides.
|
Package align is `devctl repo align`: Align now for one repository, through the reconciler, in the mode its team-file entry decides. |
|
approve
Package approve is `devctl repo approve`: the approving review of a team-file pull request, as the person, after the team check.
|
Package approve is `devctl repo approve`: the approving review of a team-file pull request, as the person, after the team check. |
|
followcircleci
Package followcircleci is `devctl repo follow-circleci`: a repository set up on a CircleCI GitHub App pipeline by the person who runs it, the fix of the reconciler's finding circleci-pipeline-missing.
|
Package followcircleci is `devctl repo follow-circleci`: a repository set up on a CircleCI GitHub App pipeline by the person who runs it, the fix of the reconciler's finding circleci-pipeline-missing. |
|
get
Package get is `devctl repo get`: one inventory record of giantswarm-repo-manager.
|
Package get is `devctl repo get`: one inventory record of giantswarm-repo-manager. |
|
info
Package info is `devctl repo info`: how giantswarm-repo-manager sees the call -- the caller, the identities, the inventory, the engine.
|
Package info is `devctl repo info`: how giantswarm-repo-manager sees the call -- the caller, the identities, the inventory, the engine. |
|
internal/auth
Package auth resolves the GitHub token the repo commands act with: the person's own, so a pull request they open is theirs.
|
Package auth resolves the GitHub token the repo commands act with: the person's own, so a pull request they open is theirs. |
|
internal/client
Package client is what the repo commands that call giantswarm-repo-manager share: the muster token from the keychain, the manager client over the person's muster endpoint, the output flag, and the text renderers of the answers the verbs have in common.
|
Package client is what the repo commands that call giantswarm-repo-manager share: the muster token from the keychain, the manager client over the person's muster endpoint, the output flag, and the text renderers of the answers the verbs have in common. |
|
internal/engine
Package engine is what the repo commands share to run the set-up steps of pkg/reposetup/reconcile as the person: the clients from the token environment variables, the repository slug, the log adapter and the result on stdout.
|
Package engine is what the repo commands share to run the set-up steps of pkg/reposetup/reconcile as the person: the clients from the token environment variables, the repository slug, the log adapter and the result on stdout. |
|
internal/write
Package write is what the team-file writes share -- adopt, update, transfer, set-lifecycle: one call to a write tool of giantswarm-repo-manager with dryRun or mode commit, the plan printed on a dry run and the outcome on a commit.
|
Package write is what the team-file writes share -- adopt, update, transfer, set-lifecycle: one call to a write tool of giantswarm-repo-manager with dryRun or mode commit, the plan printed on a dry run and the outcome on a commit. |
|
list
Package list is `devctl repo list`: the inventory of the org's repositories as giantswarm-repo-manager holds it, scoped and filtered as on the Repositories page.
|
Package list is `devctl repo list`: the inventory of the org's repositories as giantswarm-repo-manager holds it, scoped and filtered as on the Repositories page. |
|
owner
Package owner exposes the declared owning team without listing repository access grants, which the agent GitHub App cannot read.
|
Package owner exposes the declared owning team without listing repository access grants, which the agent GitHub App cannot read. |
|
renovateplan
Package renovateplan is `devctl repo renovate-plan`: what align-files does about a repository's Renovate configuration, decided by the function the scaffold of `devctl repo create` uses.
|
Package renovateplan is `devctl repo renovate-plan`: what align-files does about a repository's Renovate configuration, decided by the function the scaffold of `devctl repo create` uses. |
|
setlifecycle
Package setlifecycle is `devctl repo set-lifecycle`: a declared repository deprecated, archived or deleted through its team-file entry.
|
Package setlifecycle is `devctl repo set-lifecycle`: a declared repository deprecated, archived or deleted through its team-file entry. |
|
sweep
Package sweep is `devctl repo sweep`: the full inventory sweep, started now.
|
Package sweep is `devctl repo sweep`: the full inventory sweep, started now. |
|
transfer
Package transfer is `devctl repo transfer`: a declared repository moved to another team.
|
Package transfer is `devctl repo transfer`: a declared repository moved to another team. |
|
update
Package update is `devctl repo update`: a declared repository's team-file entry changed.
|
Package update is `devctl repo update`: a declared repository's team-file entry changed. |
|
watch
Package watch is `devctl repo watch`: a new repository followed to readiness after its creation.
|
Package watch is `devctl repo watch`: a new repository followed to readiness after its creation. |
|
gitops
Package gitops gives the reservation commands one way to find the GitOps repo: a checkout on disk, fast-forwarded to origin/main before any command logic runs.
|
Package gitops gives the reservation commands one way to find the GitOps repo: a checkout on disk, fast-forwarded to origin/main before any command logic runs. |
|
Package serve is devctl serve: the agent-facing commands as MCP tools over streamable HTTP.
|
Package serve is devctl serve: the agent-facing commands as MCP tools over streamable HTTP. |