From a4edb0423bc6f20c54f656cb1886b3cc05ba0959 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 19 Dec 2025 10:09:04 +0000 Subject: [PATCH 01/13] disabled blank issues and added issue link validation --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/pr-validation.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr-validation.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index bb961996016..d8944ceeaff 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -11,4 +11,4 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -blank_issues_enabled: true +blank_issues_enabled: false diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml new file mode 100644 index 00000000000..1156c5b32a2 --- /dev/null +++ b/.github/workflows/pr-validation.yml @@ -0,0 +1,26 @@ +# ******************************************************************************* +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +name: Pr Validation check +on: + pull_request: + types: [opened, synchronize, reopened] +jobs: + lint-commits: + name: check-commit-messages + runs-on: ubuntu-latest + steps: + - name: Verify Linked Issue + uses: hattan/verify-linked-issue-action@v1.1.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 68916db62f707d3b46fae99ebc771f5b1d67603e Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 19 Dec 2025 10:14:13 +0000 Subject: [PATCH 02/13] fixed --- .github/workflows/pr-validation.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 1156c5b32a2..5c883ea0bb4 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -14,13 +14,17 @@ name: Pr Validation check on: pull_request: - types: [opened, synchronize, reopened] + types: [edited, synchronize, opened, reopened] + check_run: + jobs: - lint-commits: - name: check-commit-messages + verify_linked_issue: runs-on: ubuntu-latest + name: Ensure Pull Request has a linked issue. steps: - name: Verify Linked Issue uses: hattan/verify-linked-issue-action@v1.1.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + message: 'Error! No linked issue found' From f27130ab48996df5f1eebf214aacff7d150b2f3d Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 19 Dec 2025 10:18:40 +0000 Subject: [PATCH 03/13] added permissions --- .github/workflows/pr-validation.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 5c883ea0bb4..a61662d6bd8 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -17,6 +17,10 @@ on: types: [edited, synchronize, opened, reopened] check_run: +permissions: + issues: read + pull-requests: read + jobs: verify_linked_issue: runs-on: ubuntu-latest From f73fa48d090d1c40546708ad171aa6298ccfec79 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 19 Dec 2025 10:28:29 +0000 Subject: [PATCH 04/13] fixed wrong setting --- .github/workflows/pr-validation.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index a61662d6bd8..b56c273068b 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -15,20 +15,17 @@ name: Pr Validation check on: pull_request: types: [edited, synchronize, opened, reopened] - check_run: -permissions: - issues: read - pull-requests: read jobs: verify_linked_issue: runs-on: ubuntu-latest name: Ensure Pull Request has a linked issue. + permissions: + pull-requests: read + issues: read # Allow label creation steps: - name: Verify Linked Issue uses: hattan/verify-linked-issue-action@v1.1.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - message: 'Error! No linked issue found' From d2360a1d1f3fd59ce95c8d9483fb43dcc3105676 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 19 Dec 2025 10:30:39 +0000 Subject: [PATCH 05/13] try out increased permissions --- .github/workflows/pr-validation.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index b56c273068b..285269aa43b 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -22,8 +22,10 @@ jobs: runs-on: ubuntu-latest name: Ensure Pull Request has a linked issue. permissions: - pull-requests: read - issues: read # Allow label creation + pages: write + contents: write + pull-requests: write + issues: write # Allow label creation steps: - name: Verify Linked Issue uses: hattan/verify-linked-issue-action@v1.1.5 From 163bbf1b59cc89a419c7b3e1a00113fde0432c71 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 19 Dec 2025 10:58:11 +0000 Subject: [PATCH 06/13] next try --- .github/workflows/pr-validation.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 285269aa43b..14b3bea5607 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -27,7 +27,18 @@ jobs: pull-requests: write issues: write # Allow label creation steps: - - name: Verify Linked Issue - uses: hattan/verify-linked-issue-action@v1.1.5 + - name: Get issues + id: get-issues + uses: mondeja/pr-linked-issues-action@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Print has linked issues + id: has-linked-issues + if: join(steps.get-issues.outputs.issues) != '' + run: echo "Has linked issues" + - name: Print has not linked issues + if: steps.has-linked-issues.conclusion == 'skipped' + run: | + echo "Error: No linked issues found for this Pull Request." + echo "Please ensure an issue is properly linked (e.g., using 'Fixes #123' in the description or via the GitHub UI)." + exit 1 From 85c9a58f4412633d34b0d7d28d9118008645508e Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Mon, 5 Jan 2026 13:12:19 +0000 Subject: [PATCH 07/13] added special config only for bugs --- .github/PULL_REQUEST_TEMPLATE/bug_fix.md | 2 + .github/scripts/check_issue_type.py | 133 +++++++++++++++++++++++ .github/workflows/pr-validation.yml | 57 ++++++++-- 3 files changed, 181 insertions(+), 11 deletions(-) create mode 100644 .github/scripts/check_issue_type.py diff --git a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md index c552764dd34..ccf08fe4690 100644 --- a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md +++ b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md @@ -17,3 +17,5 @@ > ticket yet, create one via [this issue template](../ISSUE_TEMPLATE/new?template=bug_fix.md). closes [ISSUE-NUMBER] (bugfix ticket) + + diff --git a/.github/scripts/check_issue_type.py b/.github/scripts/check_issue_type.py new file mode 100644 index 00000000000..3f25c91da1f --- /dev/null +++ b/.github/scripts/check_issue_type.py @@ -0,0 +1,133 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +#!/usr/bin/env python3 + +import os +import json +import requests +import sys +from dotenv import load_dotenv + + +def set_output(name, value): + print(f"::set-output name={name}::{value}") + +def set_failed(message): + print(f"::error::{message}") + sys.exit(1) + +def main(): + linked_issue_numbers_str = os.environ.get('LINKED_ISSUES') + github_token = os.environ.get('GITHUB_TOKEN') + repo_owner = os.environ.get('GITHUB_REPOSITORY_OWNER') + repo_name = os.environ.get('GITHUB_REPOSITORY').split('/')[-1] + + if not github_token: + set_failed("GITHUB_TOKEN is not set. Ensure it's passed as an environment variable.") + + if not linked_issue_numbers_str: + print("No issues linked in the PR description. Skipping type check.") + set_output('found_bug_issue', 'false') + set_output('found_feature_issue', 'false') + set_output('found_task_issue', 'false') + set_output('other_issue_types', '[]') + return + + try: + linked_issue_numbers = json.loads(linked_issue_numbers_str) + except json.JSONDecodeError: + set_failed(f"Failed to parse LINKED_ISSUES: {linked_issue_numbers_str}. Ensure it's valid JSON.") + + print(f"Linked issue numbers: {linked_issue_numbers}") + + found_bug_issue = False + found_feature_issue = False + found_task_issue = False + other_issue_types = [] + + graphql_url = "https://api.github.com/graphql" + headers = { + "Authorization": f"Bearer {github_token}", + "Content-Type": "application/json" + } + + for issue_number in linked_issue_numbers: + try: + query = """ + query GetIssueType($owner: String!, $repo: String!, $issueNumber: Int!) { + repository(owner: $owner, name: $repo) { + issue(number: $issueNumber) { + id + title + issueType { + name + } + } + } + } + """ + + variables = { + "owner": repo_owner, + "repo": repo_name, + "issueNumber": issue_number, + } + + response = requests.post(graphql_url, headers=headers, json={'query': query, 'variables': variables}) + response.raise_for_status() + result = response.json() + + if 'errors' in result: + set_failed(f"GraphQL errors for issue #{issue_number}: {result['errors']}") + + issue_data = result.get('data', {}).get('repository', {}).get('issue') + + if not issue_data: + print(f"Warning: Issue #{issue_number} not found in this repository or no data returned.") + other_issue_types.append({'number': issue_number, 'type': 'Issue Not Found'}) + continue + + issue_type_name = issue_data.get('issueType', {}).get('name') + + if issue_type_name: + type_value = issue_type_name + print(f"Issue #{issue_number} has Built-in Issue Type: {type_value}") + + if type_value == 'Bug': + found_bug_issue = True + elif type_value == 'Feature': + found_feature_issue = True + elif type_value == 'Task': + found_task_issue = True + else: + other_issue_types.append({'number': issue_number, 'type': type_value}) + else: + print(f"Issue #{issue_number} has no built-in 'issueType' specified.") + other_issue_types.append({'number': issue_number, 'type': 'No Built-in Issue Type'}) + + except requests.exceptions.RequestException as e: + set_failed(f"HTTP error fetching issue #{issue_number} type: {e}") + except Exception as e: + set_failed(f"An unexpected error occurred for issue #{issue_number}: {e}") + + set_output('found_bug_issue', str(found_bug_issue).lower()) + set_output('found_feature_issue', str(found_feature_issue).lower()) + set_output('found_task_issue', str(found_task_issue).lower()) + set_output('other_issue_types', json.dumps(other_issue_types)) + + if linked_issue_numbers and not (found_bug_issue or found_feature_issue or found_task_issue): + set_failed(f"No linked issue found with a recognized built-in type of 'Bug', 'Feature', or 'Task'.") + +if __name__ == "__main__": + main() diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 14b3bea5607..0fc400aa595 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -11,14 +11,15 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -name: Pr Validation check +name: Pr Validation check for bugs on: pull_request: types: [edited, synchronize, opened, reopened] jobs: - verify_linked_issue: + + verify_linked_bug_issue: runs-on: ubuntu-latest name: Ensure Pull Request has a linked issue. permissions: @@ -27,18 +28,52 @@ jobs: pull-requests: write issues: write # Allow label creation steps: + - name: Check PR Template + id: check_template + run: | + PR_BODY="${{ github.event.pull_request.body }}" + # Check if the PR body contains the unique identifier from your bug-fix.md template + if [[ "$PR_BODY" == *""* ]]; then + echo "PR uses bug-fix.md template. Proceeding with workflow." + echo "template_match=true" >> $GITHUB_OUTPUT + else + echo "PR does NOT use bug-fix.md template. Skipping subsequent steps." + echo "template_match=false" >> $GITHUB_OUTPUT + fi + + - name: Checkout code + if: steps.check_template.outputs.template_match == 'true' + uses: actions/checkout@v4.2.2 + + - name: Set up Python + if: steps.check_template.outputs.template_match == 'true' + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install dependencies + if: steps.check_template.outputs.template_match == 'true' + run: pip install requests + - name: Get issues + if: steps.check_template.outputs.template_match == 'true' id: get-issues uses: mondeja/pr-linked-issues-action@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Print has linked issues - id: has-linked-issues - if: join(steps.get-issues.outputs.issues) != '' - run: echo "Has linked issues" - - name: Print has not linked issues - if: steps.has-linked-issues.conclusion == 'skipped' + + - name: Check type of each linked issue via GraphQL (Python) + if: steps.check_template.outputs.template_match == 'true' + id: issue_type_check + run: python ./.github/scripts/check_issue_type.py + env: + LINKED_ISSUES: ${{ steps.get-issues.outputs.issues }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # These are needed by the Python script to construct the GraphQL query variables + GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} + GITHUB_REPOSITORY: ${{ github.repository }} + + - name: Fail if no Bug issue found for bug-fix PR + if: steps.check_template.outputs.template_match == 'true' && steps.issue_type_check.outputs.found_bug_issue == 'false' run: | - echo "Error: No linked issues found for this Pull Request." - echo "Please ensure an issue is properly linked (e.g., using 'Fixes #123' in the description or via the GitHub UI)." - exit 1 + echo "::error::This PR uses the bug-fix template, but no linked issue of type 'Bug' was found." + exit 1 # This will cause the workflow to fail From edb8ed43473e5bfd42f702b73f0df1bb7ae6b3aa Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Mon, 5 Jan 2026 13:15:30 +0000 Subject: [PATCH 08/13] added dotenv --- .github/workflows/pr-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 0fc400aa595..e44c91308f3 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -52,7 +52,7 @@ jobs: python-version: '3.12' - name: Install dependencies if: steps.check_template.outputs.template_match == 'true' - run: pip install requests + run: pip install requests python-dotenv - name: Get issues if: steps.check_template.outputs.template_match == 'true' From 521d6695c3177f3077aec8dedae6141f457cd12e Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Mon, 5 Jan 2026 13:18:05 +0000 Subject: [PATCH 09/13] removed fail and other issues --- .github/scripts/check_issue_type.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/scripts/check_issue_type.py b/.github/scripts/check_issue_type.py index 3f25c91da1f..7108c436ff6 100644 --- a/.github/scripts/check_issue_type.py +++ b/.github/scripts/check_issue_type.py @@ -122,12 +122,6 @@ def main(): set_failed(f"An unexpected error occurred for issue #{issue_number}: {e}") set_output('found_bug_issue', str(found_bug_issue).lower()) - set_output('found_feature_issue', str(found_feature_issue).lower()) - set_output('found_task_issue', str(found_task_issue).lower()) - set_output('other_issue_types', json.dumps(other_issue_types)) - - if linked_issue_numbers and not (found_bug_issue or found_feature_issue or found_task_issue): - set_failed(f"No linked issue found with a recognized built-in type of 'Bug', 'Feature', or 'Task'.") if __name__ == "__main__": main() From 111c310c0ac825b7f925cbc4840eebff7dc78fce Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Mon, 5 Jan 2026 13:22:53 +0000 Subject: [PATCH 10/13] added single entry handling --- .github/scripts/check_issue_type.py | 31 +++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/scripts/check_issue_type.py b/.github/scripts/check_issue_type.py index 7108c436ff6..cd9828e6763 100644 --- a/.github/scripts/check_issue_type.py +++ b/.github/scripts/check_issue_type.py @@ -20,6 +20,13 @@ from dotenv import load_dotenv +def set_output(name, value): + print(f"::set-output name={name}::{value}") + +def set_failed(message): + print(f"::error::{message}") + sys.exit(1) + def set_output(name, value): print(f"::set-output name={name}::{value}") @@ -36,6 +43,9 @@ def main(): if not github_token: set_failed("GITHUB_TOKEN is not set. Ensure it's passed as an environment variable.") + # Initialize linked_issue_numbers as an empty list + linked_issue_numbers = [] + if not linked_issue_numbers_str: print("No issues linked in the PR description. Skipping type check.") set_output('found_bug_issue', 'false') @@ -44,10 +54,22 @@ def main(): set_output('other_issue_types', '[]') return + # --- UPDATED PARSING LOGIC FOR LINKED_ISSUES --- try: - linked_issue_numbers = json.loads(linked_issue_numbers_str) + parsed_data = json.loads(linked_issue_numbers_str) + if isinstance(parsed_data, int): + # If json.loads returns a single integer, wrap it in a list + linked_issue_numbers = [parsed_data] + elif isinstance(parsed_data, list): + # If json.loads returns a list, use it directly + linked_issue_numbers = parsed_data + else: + # Handle any other unexpected types from json.loads + set_failed(f"Unexpected format for LINKED_ISSUES: {linked_issue_numbers_str}. Expected a JSON array or single number.") except json.JSONDecodeError: - set_failed(f"Failed to parse LINKED_ISSUES: {linked_issue_numbers_str}. Ensure it's valid JSON.") + # This block would catch if the string was not valid JSON at all (e.g., "abc") + set_failed(f"Failed to parse LINKED_ISSUES as JSON: {linked_issue_numbers_str}.") + # --- END UPDATED PARSING LOGIC --- print(f"Linked issue numbers: {linked_issue_numbers}") @@ -122,6 +144,11 @@ def main(): set_failed(f"An unexpected error occurred for issue #{issue_number}: {e}") set_output('found_bug_issue', str(found_bug_issue).lower()) + set_output('found_feature_issue', str(found_feature_issue).lower()) + set_output('found_task_issue', str(found_task_issue).lower()) + set_output('other_issue_types', json.dumps(other_issue_types)) + + # The workflow YAML will now handle the failure based on outputs. if __name__ == "__main__": main() From b543824fadfad5c308de4c0d01ace1a6ad1a3cc3 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Mon, 5 Jan 2026 13:35:37 +0000 Subject: [PATCH 11/13] optimized to recognize both --- .github/PULL_REQUEST_TEMPLATE/bug_fix.md | 2 +- .github/scripts/check_issue_type.py | 4 ++-- .github/workflows/pr-validation.yml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md index ccf08fe4690..787442fd1f1 100644 --- a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md +++ b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md @@ -18,4 +18,4 @@ closes [ISSUE-NUMBER] (bugfix ticket) - + diff --git a/.github/scripts/check_issue_type.py b/.github/scripts/check_issue_type.py index cd9828e6763..81ba952aea7 100644 --- a/.github/scripts/check_issue_type.py +++ b/.github/scripts/check_issue_type.py @@ -128,7 +128,7 @@ def main(): if type_value == 'Bug': found_bug_issue = True - elif type_value == 'Feature': + elif type_value == 'Feature Request': found_feature_issue = True elif type_value == 'Task': found_task_issue = True @@ -143,7 +143,7 @@ def main(): except Exception as e: set_failed(f"An unexpected error occurred for issue #{issue_number}: {e}") - set_output('found_bug_issue', str(found_bug_issue).lower()) + set_output('found_issue', str(found_bug_issue or found_feature_issue).lower()) set_output('found_feature_issue', str(found_feature_issue).lower()) set_output('found_task_issue', str(found_task_issue).lower()) set_output('other_issue_types', json.dumps(other_issue_types)) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index e44c91308f3..6920e2a175b 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -33,7 +33,7 @@ jobs: run: | PR_BODY="${{ github.event.pull_request.body }}" # Check if the PR body contains the unique identifier from your bug-fix.md template - if [[ "$PR_BODY" == *""* ]]; then + if [[ "$PR_BODY" == *""* ]]; then echo "PR uses bug-fix.md template. Proceeding with workflow." echo "template_match=true" >> $GITHUB_OUTPUT else @@ -72,8 +72,8 @@ jobs: GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} GITHUB_REPOSITORY: ${{ github.repository }} - - name: Fail if no Bug issue found for bug-fix PR - if: steps.check_template.outputs.template_match == 'true' && steps.issue_type_check.outputs.found_bug_issue == 'false' + - name: Fail if no Bug or Feature Request issue found for PR + if: steps.check_template.outputs.template_match == 'true' && steps.issue_type_check.outputs.found_issue == 'false' run: | - echo "::error::This PR uses the bug-fix template, but no linked issue of type 'Bug' was found." + echo "::error::This PR uses the improvement or bug-fix template, but no linked issue of type 'Bug' or "Feature Request" was found." exit 1 # This will cause the workflow to fail From 4042241337ecd92022888be3df48ae2e2ba8864c Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Mon, 5 Jan 2026 13:38:52 +0000 Subject: [PATCH 12/13] added stamp --- .github/PULL_REQUEST_TEMPLATE/improvement.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE/improvement.md b/.github/PULL_REQUEST_TEMPLATE/improvement.md index 9777bbb132c..e304d2eff6f 100644 --- a/.github/PULL_REQUEST_TEMPLATE/improvement.md +++ b/.github/PULL_REQUEST_TEMPLATE/improvement.md @@ -17,3 +17,5 @@ > ticket yet, create one via [this issue template](../ISSUE_TEMPLATE/new?template=improvement.md). closes [ISSUE-NUMBER] (improvement ticket) + + From fa1b8c1abb2a391ae7aa15a95f5ef3f8be3caae0 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Mon, 5 Jan 2026 13:40:37 +0000 Subject: [PATCH 13/13] removed comments --- .github/scripts/check_issue_type.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/scripts/check_issue_type.py b/.github/scripts/check_issue_type.py index 81ba952aea7..ffdde8fb96a 100644 --- a/.github/scripts/check_issue_type.py +++ b/.github/scripts/check_issue_type.py @@ -54,22 +54,18 @@ def main(): set_output('other_issue_types', '[]') return - # --- UPDATED PARSING LOGIC FOR LINKED_ISSUES --- + try: parsed_data = json.loads(linked_issue_numbers_str) if isinstance(parsed_data, int): - # If json.loads returns a single integer, wrap it in a list linked_issue_numbers = [parsed_data] elif isinstance(parsed_data, list): - # If json.loads returns a list, use it directly linked_issue_numbers = parsed_data else: - # Handle any other unexpected types from json.loads set_failed(f"Unexpected format for LINKED_ISSUES: {linked_issue_numbers_str}. Expected a JSON array or single number.") except json.JSONDecodeError: - # This block would catch if the string was not valid JSON at all (e.g., "abc") set_failed(f"Failed to parse LINKED_ISSUES as JSON: {linked_issue_numbers_str}.") - # --- END UPDATED PARSING LOGIC --- + print(f"Linked issue numbers: {linked_issue_numbers}") @@ -148,7 +144,6 @@ def main(): set_output('found_task_issue', str(found_task_issue).lower()) set_output('other_issue_types', json.dumps(other_issue_types)) - # The workflow YAML will now handle the failure based on outputs. if __name__ == "__main__": main()