Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Fix issues with label automations, update issue templates (#2085)
Madison Swain-Bowden8410251625df
diff --git a/.github/ISSUE_TEMPLATE/airflow_alert.md b/.github/ISSUE_TEMPLATE/airflow_alert.mdindex a91e1fd6e..800934e3c 100644--- a/.github/ISSUE_TEMPLATE/airflow_alert.md+++ b/.github/ISSUE_TEMPLATE/airflow_alert.md@@ -1,7 +1,7 @@---name: Airflow Alertabout: Report an alert raised by Airflow-labels: "π goal: fix, π¦ status: awaiting triage, π¬οΈ tooling: airflow"+labels: "π goal: fix, π¦ status: awaiting triage, π¬οΈ tooling: airflow, π§± stack: catalog"title: "<Replace this with actual title>"---diff --git a/.github/ISSUE_TEMPLATE/image_provider_api_integration_request.yml b/.github/ISSUE_TEMPLATE/image_provider_api_integration_request.ymlindex 7fb77f904..145cc67e0 100644--- a/.github/ISSUE_TEMPLATE/image_provider_api_integration_request.yml+++ b/.github/ISSUE_TEMPLATE/image_provider_api_integration_request.yml@@ -3,9 +3,12 @@ description: Tell us about an API providing CC-licensed imagestitle: "<Provider name here>"labels:- "π¦ status: awaiting triage"- - "β¨ goal: improvement"- "π§Ή status: ticket work required"- "βοΈ provider: images"+ - "π» aspect: code"+ - "π goal: addition"+ - "π§± stack: catalog"+ - "π© priority: low"body:- type: inputid: providerdiff --git a/.github/ISSUE_TEMPLATE/new_source_suggestion.yml b/.github/ISSUE_TEMPLATE/new_source_suggestion.ymlindex 9800fc3a5..568ff5a27 100644--- a/.github/ISSUE_TEMPLATE/new_source_suggestion.yml+++ b/.github/ISSUE_TEMPLATE/new_source_suggestion.yml@@ -5,6 +5,10 @@ labels:- "π¦ status: awaiting triage"- "π§Ή status: ticket work required"- "βοΈ provider: any"+ - "π» aspect: code"+ - "π goal: addition"+ - "π§± stack: catalog"+ - "π© priority: low"body:- type: inputid: sourcediff --git a/.github/ISSUE_TEMPLATE/project_thread.md b/.github/ISSUE_TEMPLATE/project_thread.mdindex da602224a..7e38f583c 100644--- a/.github/ISSUE_TEMPLATE/project_thread.md+++ b/.github/ISSUE_TEMPLATE/project_thread.md@@ -1,7 +1,7 @@---name: Project Threadabout: An issue to track and outline a new project-labels: "project"+labels: "π§ project: thread"title: "<Replace this with actual title>"---diff --git a/automations/python/print_labels.py b/automations/python/print_labels.pynew file mode 100644index 000000000..2f77b2a0b--- /dev/null+++ b/automations/python/print_labels.py@@ -0,0 +1,8 @@+"""Simple utility for printing all the labels from labels.yml."""+from shared.labels import get_labels+++if __name__ == "__main__":+ labels = get_labels()+ for label in labels:+ print(label)diff --git a/automations/python/shared/labels.py b/automations/python/shared/labels.pyindex 3f89b94a4..07dd41236 100644--- a/automations/python/shared/labels.py+++ b/automations/python/shared/labels.py@@ -1,5 +1,4 @@from copy import deepcopy-from itertools import chainfrom models.label import Labelfrom models.label_group import LabelGroup@@ -29,7 +28,9 @@ def get_labels() -> list[Label]:"""labels_file = deepcopy(get_data("labels.yml"))grouped_labels = get_labels_by_group(labels_file)- standard_labels = list(chain(group.labels for group in grouped_labels.values()))+ standard_labels = [+ label for group in grouped_labels.values() for label in group.labels+ ]# Also grab standard labelsfor label_info in labels_file["standalone"]:label = Label(**label_info)diff --git a/automations/python/sync_labels.py b/automations/python/sync_labels.pyindex 93c20ef30..395a47fc6 100644--- a/automations/python/sync_labels.py+++ b/automations/python/sync_labels.py@@ -23,7 +23,7 @@ def set_labels(repo: Repository, labels: list[Label]):"""log.info(f"Fetching existing labels from {repo.full_name}")- existing_labels = {label.name.casefold(): label for label in get_labels()}+ existing_labels = {label.name.casefold(): label for label in repo.get_labels()}log.info(f"Found {len(existing_labels)} existing labels")for label in labels:@@ -58,7 +58,7 @@ def main():log.info(f"β’ {label.qualified_name}")repos = [org.get_repo(repo_name) for repo_name in repo_names]for repo in repos:- set_labels(repo, get_labels())+ set_labels(repo, labels)if __name__ == "__main__":