Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddCmd = cli.Command{ Name: "repo", Description: "Use this command to add a repository.", Usage: "Add a repository", Action: add, Before: validate, Flags: []cli.Flag{ cli.StringFlag{ Name: "org", Usage: "Provide the organization for the repository", EnvVar: "REPO_ORG", }, cli.StringFlag{ Name: "repo", Usage: "Provide the repository contained with the organization", EnvVar: "REPO_NAME", }, cli.StringFlag{ Name: "link", Usage: "Link to repository in source control", EnvVar: "REPO_LINK", }, cli.StringFlag{ Name: "clone", Usage: "Clone link to repository in source control", EnvVar: "REPO_CLONE", }, cli.Int64Flag{ Name: "timeout", Usage: "Allow management of timeouts", EnvVar: "REPO_TIMEOUT", Value: 60, }, cli.BoolFlag{ Name: "private", Usage: "Allow management of private repositories", EnvVar: "REPO_PRIVATE", }, cli.BoolFlag{ Name: "trusted", Usage: "Allow management of trusted repositories", EnvVar: "REPO_TRUSTED", }, cli.BoolTFlag{ Name: "active", Usage: "Allow management of activity on repositories", EnvVar: "REPO_ACTIVE", }, cli.StringSliceFlag{ Name: "event", Usage: "Allow management of the repository trigger events", EnvVar: "REPO_EVENT", Value: &cli.StringSlice{}, }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Add a repository with push and pull request enabled. $ {{.HelpName}} --org github --repo octocat --event push --event pull_request 2. Add a repository with all event types enabled. $ {{.HelpName}} --org github --repo octocat --event push --event pull_request --event tag --event deployment 3. Add a repository with a longer build timeout. $ {{.HelpName}} --org github --repo octocat --timeout 90 4. Add a repository with push and pull request enabled when org and repo config or environment variables are set. $ {{.HelpName}} --event push --event pull_request `, cli.CommandHelpTemplate), }
AddCmd defines the command for adding a repository.
View Source
var GetCmd = cli.Command{ Name: "repo", Aliases: []string{"repos"}, Description: "Use this command to get a list of repositories.", Usage: "Display a list of repositories", Action: get, Flags: []cli.Flag{ cli.StringFlag{ Name: "output,o", Usage: "Print the output in wide, yaml or json format", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Get repositories. $ {{.HelpName}} 2. Get repositories with wide view output. $ {{.HelpName}} --output wide 3. Get repositories with yaml output. $ {{.HelpName}} --output yaml 4. Get repositories with json output. $ {{.HelpName}} --output json `, cli.CommandHelpTemplate), }
GetCmd defines the command for getting a list of repositories.
View Source
var RemoveCmd = cli.Command{ Name: "repo", Description: "Use this command to remove a repository.", Usage: "Remove a repository", Action: remove, Before: validate, Flags: []cli.Flag{ cli.StringFlag{ Name: "org", Usage: "Provide the organization for the repository", EnvVar: "REPO_ORG", }, cli.StringFlag{ Name: "repo", Usage: "Provide the repository contained with the organization", EnvVar: "REPO_NAME", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Remove a repository. $ {{.HelpName}} --org github --repo octocat 2. Remove a repository when org and repo config or environment variables are set. $ {{.HelpName}} `, cli.CommandHelpTemplate), }
RemoveCmd defines the command for deleting a repository.
View Source
var UpdateCmd = cli.Command{ Name: "repo", Description: "Use this command to update a repository.", Usage: "Update a repository", Action: update, Before: validate, Flags: []cli.Flag{ cli.StringFlag{ Name: "org", Usage: "Provide the organization for the repository", EnvVar: "REPO_ORG", }, cli.StringFlag{ Name: "repo", Usage: "Provide the repository contained with the organization", EnvVar: "REPO_NAME", }, cli.StringFlag{ Name: "link", Usage: "Link to repository in source control", EnvVar: "REPO_LINK", }, cli.StringFlag{ Name: "clone", Usage: "Clone link to repository in source control", EnvVar: "REPO_CLONE", }, cli.Int64Flag{ Name: "timeout", Usage: "Allow management of timeouts", EnvVar: "REPO_TIMEOUT", Value: 60, }, cli.BoolFlag{ Name: "private", Usage: "Allow management of private repositories", EnvVar: "REPO_PRIVATE", }, cli.BoolFlag{ Name: "trusted", Usage: "Allow management of trusted repositories", EnvVar: "REPO_TRUSTED", }, cli.BoolTFlag{ Name: "active", Usage: "Allow management of activity on repositories", EnvVar: "REPO_ACTIVE", }, cli.StringSliceFlag{ Name: "event", Usage: "Allow management of the repository trigger events", EnvVar: "REPO_EVENT", Value: &cli.StringSlice{}, }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Update a repository. $ {{.HelpName}} --org github --repo octocat 2. Update a repository with all event types enabled. $ {{.HelpName}} --org github --repo octocat --event push --event pull_request --event tag --event deployment 3. Update a repository with a longer build timeout. $ {{.HelpName}} --org github --repo octocat --timeout 90 4. Update a repository when org and repo config or environment variables are set. $ {{.HelpName}} `, cli.CommandHelpTemplate), }
UpdateCmd defines the command to update a repository.
View Source
var ViewCmd = cli.Command{ Name: "repo", Description: "Use this command to view a repository.", Usage: "View details of the provided repository", Action: view, Before: validate, Flags: []cli.Flag{ cli.StringFlag{ Name: "org", Usage: "Provide the organization for the repository", EnvVar: "REPO_ORG", }, cli.StringFlag{ Name: "repo", Usage: "Provide the repository contained with the organization", EnvVar: "REPO_NAME", }, cli.StringFlag{ Name: "output,o", Usage: "Print the output in json format", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. View repository details. $ {{.HelpName}} --org github --repo octocat 2. View repository details with json output. $ {{.HelpName}} --org github --repo octocat --output json 3. View repository details when org and repo config or environment variables are set. $ {{.HelpName}} `, cli.CommandHelpTemplate), }
ViewCmd defines the command for viewing a repository.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.