Skip to content

Commit ffe871c

Browse files
authored
Merge pull request #5 from andre-alves/andre/fix-root-file
Fix when CODEOWNERS is in root
2 parents a3ba945 + 2e44e78 commit ffe871c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/missing_codeowners/plugin.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ def git_all_files
116116
end
117117

118118
def find_codeowners_file
119-
directories = ["", ".gitlab", ".github", "docs"]
119+
return "CODEOWNERS" if File.exist?("CODEOWNERS")
120+
121+
directories = [".gitlab", ".github", "docs"]
120122
paths = directories.map { |dir| File.join(dir, "CODEOWNERS") }
121123
Dir.glob(paths).first || paths.first
122124
end

0 commit comments

Comments
 (0)