Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/label_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resolution_label_notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Answered** - Issue is answered.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Cannot Reproduce** - Issue cannot be reproduced.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Done** - Issue is done.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Duplicate** - Issue is already reported before.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Fixed** - Issue is fixed.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Invalid** - Issue is invalid.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Not a bug** - Issue is not a bug.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Postponed** - Issue is postponed.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- **Resolution/Won’t Fix** - Issue won't be fixed."
Expand Down