Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A golang library to parse and query a CODEOWNERS file from Gitlab.

License

NotificationsYou must be signed in to change notification settings

chefe/gitlabcodeowners

Repository files navigation

Go Report CardGitHub ActionsGo Reference

gitlabcodeowners

import"github.com/chefe/gitlabcodeowners"

Package gitlabcodeowners provides parsing and querying function to work with `CODEOWNERS` file from Gitlab. Seehttps://docs.gitlab.com/ee/user/project/codeowners for more details.

Index

funcGetPossibleCodeOwnersLocations() []string

GetPossibleCodeOwnersLocations returns a list of possible locations where a `CODEOWNERS` file can be located according to Gitlab.

Approval describes an approval required by a rule in the `CODEOWNERS` file.

typeApprovalstruct {PatternstringApprovalsintOwners    []string}

typeFile

File is a representation of a parsed `CODEOWNERS` file.

typeFilestruct {// contains filtered or unexported fields}

funcNewCodeOwnersFile(reader io.Reader) (File,error)

NewCodeOwnersFile tries to parse the given description and returns a `File` instance if parsing succeeded otherwise it return an error.

func (fFile)GetRequiredApprovalsForFile(pathstring)map[string]Approval

GetRequiredApprovalsForFile returns a map of all approvals which apply to the file given by it's path. All path need to start with a `/` which represents the root folder of the repository.

func (fFile)GetRequiredApprovalsForFiles(paths []string)map[string][]Approval

GetRequiredApprovalsForFiles returns a map of all approvals which apply to the files given by their path. All paths need to start with a `/` which represents the root folder of the repository.

Generated bygomarkdoc

About

A golang library to parse and query a CODEOWNERS file from Gitlab.

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp