codeowners

package module
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 6 Imported by: 0

README

codeowners

CI

List up CODEOWNERS of all repositories.

Usage

Usage: codeowners --user=STRING --org=STRING --token=STRING [flags]

Flags:
  -h, --help            Show help.
  -u, --user=STRING     User name.
  -o, --org=STRING      Organization name.
      --token=STRING    Authentication token for github.com API requests ($GITHUB_TOKEN).
  -y, --[no-]yaml       Output as YAML.
      --version
$ codeowners -o my-org
[
  {
    "repo": "my-repo-1",
    "exists": true,
    "content": "* @bob\n"
  },
  {
    "repo": "my-repo-2",
    "exists": true,
    "content": "* @alice\n"
  },
  {
    "repo": "my-repo-3",
    "exists": false
  }
]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codeowners

type Codeowners struct {
	Repo    string `json:"repo" yaml:"repo"`
	Exists  bool   `json:"exists" yaml:"exists"`
	Content string `json:"content,omitempty" yaml:"content,omitempty"`
}

func List

func List(ctx context.Context, options *Options) ([]*Codeowners, error)

type Options

type Options struct {
	User  string `short:"u" xor:"user,org" required:"" help:"User name."`
	Org   string `short:"o" xor:"org" required:"" help:"Organization name."`
	Token string `required:"" env:"GITHUB_TOKEN" help:"Authentication token for github.com API requests."`
	Yaml  bool   `negatable:"" short:"y" help:"Output as YAML."`
}

Directories

Path Synopsis
cmd
codeowners command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL