diff --git a/.github/workflows/label_checker.py b/.github/workflows/label_checker.py
index b2d696a8be..03337d876c 100644
--- a/.github/workflows/label_checker.py
+++ b/.github/workflows/label_checker.py
@@ -12,18 +12,28 @@
exit(0)
# Get affected component
-i = os.environ["ISSUE_BODY"].index("### Affected Component")
-j = os.environ["ISSUE_BODY"].index("### Version")
-component = os.environ["ISSUE_BODY"][i+23:j].strip()
-component_label = "Component/" + component
-if component_label in all_existing_labels:
- labels.append(component_label)
+component = None
+i = os.environ["ISSUE_BODY"].find("### Affected Component")
+j = os.environ["ISSUE_BODY"].find("### Version")
+
+if i != -1 and j != -1 and j > i:
+ component = os.environ["ISSUE_BODY"][i+23:j].strip()
+ component_label = "Component/" + component
+ if component_label in all_existing_labels:
+ labels.append(component_label)
# Get component version
-version = os.environ["ISSUE_BODY"][j+13:j+18].strip()
-affected_label = "Affected/" + component + "-" + version
-if affected_label in all_existing_labels:
- labels.append(affected_label)
+if j != -1:
+ k = os.environ["ISSUE_BODY"].find("###", j + 11)
+ if k != -1:
+ version = os.environ["ISSUE_BODY"][j+11:k].strip()
+ else:
+ version = os.environ["ISSUE_BODY"][j+11:].strip()
+
+ if component is not None:
+ affected_label = "Affected/" + component + "-" + version
+ if affected_label in all_existing_labels:
+ labels.append(affected_label)
# Return verified labels
if len(labels) > 0:
diff --git a/.github/workflows/resolution_label_notifier.yml b/.github/workflows/resolution_label_notifier.yml
index 56d608182b..bd081ca481 100644
--- a/.github/workflows/resolution_label_notifier.yml
+++ b/.github/workflows/resolution_label_notifier.yml
@@ -16,7 +16,7 @@ jobs:
contains(github.event.issue.labels.*.name, 'Resolution/Not a bug') ||
contains(github.event.issue.labels.*.name, 'Resolution/Postponed') ||
contains(github.event.issue.labels.*.name, 'Resolution/Won’t Fix') ||
- contains(github.event.issue.labels.*.name, 'Resolution/Done)
+ contains(github.event.issue.labels.*.name, 'Resolution/Done')
)}}
steps:
- run: gh issue comment $ISSUE --body "This issue is **NOT** closed with a proper **Resolution/** label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- **Resolution/Answered** - Issue is answered.
- **Resolution/Cannot Reproduce** - Issue cannot be reproduced.
- **Resolution/Done** - Issue is done.
- **Resolution/Duplicate** - Issue is already reported before.
- **Resolution/Fixed** - Issue is fixed.
- **Resolution/Invalid** - Issue is invalid.
- **Resolution/Not a bug** - Issue is not a bug.
- **Resolution/Postponed** - Issue is postponed.
- **Resolution/Won’t Fix** - Issue won't be fixed."