maintainers.py: Add reverse checks for wiki and updater
* Check if some device has wiki page or updater entry and warn when it's not marked as deprecated in wiki and doesn't receive builds at the moment. Change-Id: Ibb7d3f3fee5be01cbc06af27f6bdd3131769ceae
This commit is contained in:
@@ -29,6 +29,8 @@ cve_entries = []
|
|||||||
updater_pages = []
|
updater_pages = []
|
||||||
# List of jira developers
|
# List of jira developers
|
||||||
jira_devs = []
|
jira_devs = []
|
||||||
|
# Discontinued devices
|
||||||
|
discontinued_devices = []
|
||||||
|
|
||||||
# Open file and input lines as items in list
|
# Open file and input lines as items in list
|
||||||
hudson_file = os.path.join(mydir, repo["hudson"] + "/lineage-build-targets")
|
hudson_file = os.path.join(mydir, repo["hudson"] + "/lineage-build-targets")
|
||||||
@@ -65,11 +67,6 @@ with open(updater_json_file) as f:
|
|||||||
for device in json_file:
|
for device in json_file:
|
||||||
updater_pages.append(device["model"])
|
updater_pages.append(device["model"])
|
||||||
|
|
||||||
# Updater checking
|
|
||||||
for codename in codenames:
|
|
||||||
if codename not in updater_pages:
|
|
||||||
print("{} doesn't have an updater page".format(codename))
|
|
||||||
|
|
||||||
# Wiki checking
|
# Wiki checking
|
||||||
for codename in codenames:
|
for codename in codenames:
|
||||||
wiki_yml_file = os.path.join(mydir, repo["wiki"] + "/_data/devices/" + codename + ".yml")
|
wiki_yml_file = os.path.join(mydir, repo["wiki"] + "/_data/devices/" + codename + ".yml")
|
||||||
@@ -108,6 +105,27 @@ for codename in codenames:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
wiki_yml_dir = os.path.join(mydir, repo["wiki"] + "/_data/devices")
|
||||||
|
for wiki_yml in os.listdir(wiki_yml_dir):
|
||||||
|
codename = re.sub(r"\.yml", "", wiki_yml.strip())
|
||||||
|
if codename not in codenames:
|
||||||
|
wiki_yml_file = os.path.join(mydir, repo["wiki"] + "/_data/devices/" + wiki_yml)
|
||||||
|
with open(wiki_yml_file) as f:
|
||||||
|
yml = yaml.load(f)
|
||||||
|
if "discontinued" not in yml["channels"]:
|
||||||
|
print("{} has a wiki page but isn't in hudson".format(codename))
|
||||||
|
else:
|
||||||
|
discontinued_devices.append(codename)
|
||||||
|
|
||||||
|
# Updater checking
|
||||||
|
for codename in codenames:
|
||||||
|
if codename not in updater_pages:
|
||||||
|
print("{} doesn't have an updater page".format(codename))
|
||||||
|
|
||||||
|
for codename in updater_pages:
|
||||||
|
if codename not in codenames and codename not in discontinued_devices:
|
||||||
|
print("{} has an updater page but is not in hudson".format(codename))
|
||||||
|
|
||||||
# Optionally print out all maintainer info
|
# Optionally print out all maintainer info
|
||||||
if args.maintainers:
|
if args.maintainers:
|
||||||
print("---------------MAINTAINER INFO DUMP---------------")
|
print("---------------MAINTAINER INFO DUMP---------------")
|
||||||
|
|||||||
Reference in New Issue
Block a user