mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 00:17:37 +01:00
458bc96f8a
GitOrigin-RevId: e9fdcd09c9d513c07cc69ddc316eef2f63a746e7
20 lines
630 B
Python
20 lines
630 B
Python
import glob
|
|
|
|
import yaml
|
|
|
|
if __name__ == "__main__":
|
|
approvers = set()
|
|
owners_paths = glob.glob("**/OWNERS.yml", recursive=True)
|
|
print(len(owners_paths))
|
|
for path in owners_paths:
|
|
with open(path, "r") as owner_file:
|
|
contents = yaml.safe_load(owner_file)
|
|
if "filters" not in contents:
|
|
continue
|
|
for file_filter in contents["filters"]:
|
|
assert "approvers" in file_filter
|
|
approvers.update(set(file_filter["approvers"]))
|
|
|
|
f = open("co_jira_map.yml", "w+")
|
|
yaml.dump({approver: "jira_team" for approver in approvers}, f)
|