codeowners

package
v0.0.0-...-60d670b Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package codeowners contains logic for loading and parsing patterns in CODEOWNERS files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathIsCodeowners

func PathIsCodeowners(path string, fs billy.Filesystem) bool

PathIsCodeowners returns whether or not the provided path is for a valid CODEOWNERS file see: https://help.github.com/articles/about-code-owners/#codeowners-file-location

Types

type Codeowners

type Codeowners []OwnerEntry

Codeowners is the deserialized form of a given CODEOWNERS file

func LoadFromFilesystem

func LoadFromFilesystem(fs billy.Filesystem) (Codeowners, error)

LoadFromFilesystem loads and deserializes a CODEOWNERS file from the given repository, if one exists

func (*Codeowners) Owners

func (o *Codeowners) Owners(path string) []string

Owners returns the list of owners for a given path, in the event of a match

type OwnerEntry

type OwnerEntry struct {
	Pattern git.IgnorePattern
	Owners  []string
	// contains filtered or unexported fields
}

OwnerEntry contains owners for a given pattern

func (OwnerEntry) String

func (e OwnerEntry) String() string

Jump to

Keyboard shortcuts

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