Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Add awaiting triage label onto existing labels (#924)
Madison Swain-Bowden802ec52bd575
diff --git a/automations/python/label_pr.py b/automations/python/label_pr.pyindex 6bea6d33f..af1bfc04c 100644--- a/automations/python/label_pr.py+++ b/automations/python/label_pr.py@@ -23,7 +23,7 @@ from shared.log import configure_loggerlog = logging.getLogger(__name__)REQUIRED_LABEL_CATEGORIES = ["aspect", "priority", "goal", "stack"]-# Categories where all labels should be retrievd rather than first only+# Categories where all labels should be retrieved rather than first onlyGET_ALL_LABEL_CATEGORIES = {"stack"}# region argparse@@ -150,7 +150,7 @@ def get_linked_issues(url: str) -> list[str]:def get_all_labels_of_cat(cat: str, labels: list[Label]) -> list[Label]:"""- Get all of the available labels from a category from a given list of+ Get all the available labels from a category from a given list oflabels.:param cat: the category to which the label should belong@@ -222,7 +222,8 @@ def main():breakelse:log.info("Could not find properly labelled issue")- pr.set_labels("🚦 status: awaiting triage")+ # Only add the triage label onto existing labels, don't replace them+ pr.set_labels("🚦 status: awaiting triage", *pr.get_labels())if __name__ == "__main__":diff --git a/automations/python/shared/github.py b/automations/python/shared/github.pyindex 6a243d5b7..d3dcfb3a4 100644--- a/automations/python/shared/github.py+++ b/automations/python/shared/github.py@@ -24,7 +24,7 @@ def get_client(is_authenticated: bool = True) -> Github:"""Get a PyGithub client to access the GitHub API.- The client can optionally be authenticated using the GITHUB_ACCESS_TOKEN+ The client can optionally be authenticated using the ACCESS_TOKENfrom the environment variables.:param is_authenticated: whether to authenticate the client