vuls: init at 0.27.0
[NixPkgs.git] / ci / codeowners-validator / owners-file-name.patch
blobd8b87ba2f84a1534a01c60c02e41193d37adfd35
1 diff --git a/pkg/codeowners/owners.go b/pkg/codeowners/owners.go
2 index 6910bd2..e0c95e9 100644
3 --- a/pkg/codeowners/owners.go
4 +++ b/pkg/codeowners/owners.go
5 @@ -39,6 +39,10 @@ func NewFromPath(repoPath string) ([]Entry, error) {
6 // openCodeownersFile finds a CODEOWNERS file and returns content.
7 // see: https://help.github.com/articles/about-code-owners/#codeowners-file-location
8 func openCodeownersFile(dir string) (io.Reader, error) {
9 + if file, ok := os.LookupEnv("OWNERS_FILE"); ok {
10 + return fs.Open(file)
11 + }
13 var detectedFiles []string
14 for _, p := range []string{".", "docs", ".github"} {
15 pth := path.Join(dir, p)