From 63d7740c94e09d8fda257a1ab892b7fd782afec0 Mon Sep 17 00:00:00 2001 From: subodha-wijesekara Date: Sat, 11 Apr 2026 11:47:25 +0530 Subject: [PATCH 1/2] fix(workflows): resolve yaml syntax error and python script exceptions This commit fixes two issues in the GitHub Actions workflows: - resolution_label_notifier.yml: Added missing closing single quote preventing valid YAML parsing. - label_checker.py: Swapped .index() to .find() to avoid ValueError on missing issue template fields and improved robust version extraction. --- .github/workflows/label_checker.py | 30 ++++++++++++------- .../workflows/resolution_label_notifier.yml | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/label_checker.py b/.github/workflows/label_checker.py index b2d696a8be..1386bcdf1c 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: + 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." From 1e31718df4e1ffbc44a45c97cf8d9dfbda5016cf Mon Sep 17 00:00:00 2001 From: Subodha Wijesekara Date: Wed, 22 Apr 2026 18:48:29 +0530 Subject: [PATCH 2/2] Update .github/workflows/label_checker.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/label_checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label_checker.py b/.github/workflows/label_checker.py index 1386bcdf1c..03337d876c 100644 --- a/.github/workflows/label_checker.py +++ b/.github/workflows/label_checker.py @@ -16,7 +16,7 @@ i = os.environ["ISSUE_BODY"].find("### Affected Component") j = os.environ["ISSUE_BODY"].find("### Version") -if i != -1 and j != -1: +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: