SERVER-106116 add linting for adding default owner to codeowners (#37579)

GitOrigin-RevId: b1a3db5037f7a1828151fbffdb85b86117c121a8
This commit is contained in:
Trevor Guidry
2025-06-23 10:13:23 -05:00
committed by MongoDB Bot
parent 83ff3fec5c
commit ab6acf0278
5 changed files with 84 additions and 33 deletions

View File

@@ -134,9 +134,9 @@ def get_files_to_lint() -> List[str]:
# Returns all tracked files and unstaged files
repo = Repo()
# all tracked files by git
tracked_files = repo.git.execute(["git", "ls-files"]).split("\n")
tracked_files = set(repo.git.execute(["git", "ls-files"]).split("\n"))
# all unstaged files from git
tracked_files.extend(
tracked_files.update(
repo.git.execute(["git", "ls-files", "--others", "--exclude-standard"]).split("\n")
)
# remove any empty entries