Skip to content

Commit 3065da2

Browse files
authored
Merge pull request #107 from creativecommons/incomplete_issue_labelling
Incomplete issue labelling
2 parents 45aaf67 + 61ea970 commit 3065da2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

normalize_repos/labels.yml

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ groups:
3434
color: 'DARK'
3535
description: Needs more details before it can be worked on
3636
emoji: "🧹"
37+
- name: label work required
38+
color: 'DARK'
39+
description: Needs proper labelling before it can be worked on
40+
emoji: "🏷"
3741
- name: discarded
3842
color: 'LIGHTER'
3943
description: Will not be worked on

normalize_repos/validate_issues.py

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
log.reset_handler()
1010

1111
TRIAGE_LABEL = "🚦 status: awaiting triage"
12+
LABEL_WORK_REQUIRED_LABEL = "🏷 status: label work required"
1213

1314

1415
def dump_invalid_issues(invalid_issues):
@@ -55,8 +56,12 @@ def are_issue_labels_valid(issue, required_groups):
5556
if not label_names.intersection(required_labels):
5657
missing_groups.append(group.name)
5758
if missing_groups:
59+
issue.add_to_labels(LABEL_WORK_REQUIRED_LABEL)
5860
logger.log(logging.INFO, f"Issue '{issue.title}' has missing labels.")
5961
return False, f"Missing labels from groups: {', '.join(missing_groups)}"
62+
else:
63+
if LABEL_WORK_REQUIRED_LABEL in label_names:
64+
issue.remove_from_labels(LABEL_WORK_REQUIRED_LABEL)
6065

6166
logger.log(logging.INFO, f"Issue '{issue.title}' is OK.")
6267
return True, None

0 commit comments

Comments
 (0)