Skip to content

revert: PythonBot workflow and script changes#1813

Closed
Abhijeet2409 wants to merge 6 commits into
hiero-ledger:mainfrom
Abhijeet2409:revert-bot-workflow
Closed

revert: PythonBot workflow and script changes#1813
Abhijeet2409 wants to merge 6 commits into
hiero-ledger:mainfrom
Abhijeet2409:revert-bot-workflow

Conversation

@Abhijeet2409

@Abhijeet2409 Abhijeet2409 commented Feb 15, 2026

Copy link
Copy Markdown
Member

This PR restores the PythonBot (workflow failure notifier) workflow file to its original version to restore stability.
As discussed with maintainers, the workflow recently failed when attempting to post PR comments. To avoid disrupting repository workflows, we are reverting the previous changes to restore the previous stable behavior.

Closes #1789

…tability

Signed-off-by: Abhijeet Saharan <abhijeetsaharan2236@gmail.com>
@github-actions

Copy link
Copy Markdown
Hi @Abhijeet2409, this is **LinkBot** 👋

Linking pull requests to issues helps us significantly with reviewing pull requests and keeping the repository healthy.

🚨 This pull request does not have an issue linked.

Please link an issue using the following format:

Fixes #123

📖 Guide:
docs/sdk_developers/how_to_link_issues.md

If no issue exists yet, please create one:
docs/sdk_developers/creating_issues.md

Thanks!

@codecov

codecov Bot commented Feb 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1813      +/-   ##
==========================================
+ Coverage   93.29%   93.33%   +0.03%     
==========================================
  Files         141      141              
  Lines        9118     9118              
==========================================
+ Hits         8507     8510       +3     
+ Misses        611      608       -3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Abhijeet Saharan <abhijeetsaharan2236@gmail.com>
@Abhijeet2409
Abhijeet2409 marked this pull request as ready for review February 15, 2026 18:18
@Abhijeet2409
Abhijeet2409 requested review from a team as code owners February 15, 2026 18:18
@coderabbitai

coderabbitai Bot commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Removes the Node.js workflow-failure notifier script and replaces it with inline bash steps in the GitHub Actions workflow that determine the associated PR and conditionally post a static guidance comment. Also updates workflow triggers, permissions, concurrency, runner action version, and adds a changelog entry.

Changes

Cohort / File(s) Summary
Removed bot script
.github/scripts/bot-workflows.js
Deleted the Node.js workflow-failure notifier script that handled env validation, gh CLI checks, PR detection, pagination-based duplicate comment detection, and posting. Confirm there are no remaining invocations.
Workflow changes
.github/workflows/bot-workflows.yml
Replaced script invocation with inline bash steps: removed workflow_dispatch inputs, simplified failure-only condition, removed some listed workflows from workflow_run, changed pull-requests permission to write, updated concurrency expression to use head branch, hardened runner action version, removed checkout/setup-node steps, added steps to get the associated PR number and to post a static PR comment with duplicate-check logic via gh.
Changelog
CHANGELOG.md
Added entry noting reversion of PythonBot workflow and removal of the bot script; documents restoration of previous behavior.

Sequence Diagram(s)

sequenceDiagram
    participant WF as GitHub Actions Workflow
    participant Runner as Job Runner
    participant GH as gh CLI / GitHub API
    participant PR as Pull Request

    WF->>Runner: workflow_run event (conclusion == failure)
    Runner->>GH: query associated PR for head branch
    GH-->>Runner: PR number or none
    alt PR found
        Runner->>GH: list PR comments (search marker)
        GH-->>Runner: comments list
        alt marker not found
            Runner->>GH: post static guidance comment
            GH-->>PR: comment created
        else marker found
            Runner-->>Runner: skip posting
        end
    else no PR
        Runner-->>Runner: log no associated PR
    end
    Runner-->>WF: job complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: reverting PythonBot workflow and script changes to restore stability.
Description check ✅ Passed The description clearly explains the purpose of the revert, the reason (workflow failure when posting PR comments), and mentions discussion with maintainers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Comment thread .github/scripts/bot-workflows.js Outdated

@exploreriii exploreriii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Abhijeet2409
This PR reverts the workflow to the second-version of it, the one that tried to fix the upgrade.
I think you want to revert the upgrade itself, so, you should look at the PR for the attempted upgrade
https://github.com/hiero-ledger/hiero-sdk-python/pull/1431/changes
and un do those changes, i.e. the final output should look like the stuff in red that was originally changed or deleted
it should just be a one file
bot-workflows.yml

@exploreriii
exploreriii marked this pull request as draft February 15, 2026 21:52
Signed-off-by: Abhijeet <abhijeetsaharan2236@gmail.com>
Comment thread .github/scripts/bot-workflows.js Outdated
let DRY_RUN = normaliseDryRun(process.env.DRY_RUN || '1');
let PR_NUMBER = process.env.PR_NUMBER || '';

// Validate workflow name contains only safe characters

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you won't need this script anymore :)
Please double check

You can also check this 'old' workflow runs by testing it on your fork

  • merge your change to main
  • create a PR with a failed check
  • see if it works!

@Abhijeet2409
Abhijeet2409 marked this pull request as ready for review February 15, 2026 22:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Comment on lines +25 to +37
- name: Get associated PR number
id: get-pr
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get branch from the workflow run
HEAD_BRANCH=$(gh run view ${{ github.event.workflow_run.id }} \
--repo ${{ github.repository }} \
--json headBranch --jq '.headBranch')

- name: Notify PR of workflow failure
if: github.event_name != 'workflow_dispatch' || github.event.inputs.failed_run_id != ''
# Find the PR number for this branch (only open PRs)
PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --state open --head "$HEAD_BRANCH" --json number --jq '.[0].number')
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Inline shell logic should be extracted to a script file.

This run: block and the one below (lines 43–68) contain non-trivial logic — API calls, variable assignment, conditionals, and string construction — all embedded directly in YAML. Per guidelines, all non-trivial logic must live in .github/scripts/*.sh, and the workflow filename and script should share a matching name (e.g., .github/scripts/bot-workflows.sh).

As per coding guidelines, "All non-trivial logic MUST live in .github/scripts/*.sh or .github/scripts/*.js" and "YAML should orchestrate execution only."

Comment on lines +31 to +36
HEAD_BRANCH=$(gh run view ${{ github.event.workflow_run.id }} \
--repo ${{ github.repository }} \
--json headBranch --jq '.headBranch')

- name: Notify PR of workflow failure
if: github.event_name != 'workflow_dispatch' || github.event.inputs.failed_run_id != ''
# Find the PR number for this branch (only open PRs)
PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --state open --head "$HEAD_BRANCH" --json number --jq '.[0].number')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Branch name is user-controlled input — potential injection risk.

HEAD_BRANCH is derived from the workflow run's branch name, which is set by the PR author. It is then interpolated into the gh pr list --head argument on line 36. While gh CLI provides some protection, a crafted branch name could still cause unexpected behavior in bash. Use -- to separate options from arguments and validate the branch name against an allowlist pattern.

Proposed hardening
-          HEAD_BRANCH=$(gh run view ${{ github.event.workflow_run.id }} \
-            --repo ${{ github.repository }} \
-            --json headBranch --jq '.headBranch')
+          HEAD_BRANCH=$(gh run view "${{ github.event.workflow_run.id }}" \
+            --repo "${{ github.repository }}" \
+            --json headBranch --jq '.headBranch')
+
+          # Validate branch name contains only safe characters
+          if [[ ! "$HEAD_BRANCH" =~ ^[a-zA-Z0-9/_.-]+$ ]]; then
+            echo "::error::Invalid branch name: contains unsafe characters"
+            exit 1
+          fi
           
-          PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --state open --head "$HEAD_BRANCH" --json number --jq '.[0].number')
+          PR_NUMBER=$(gh pr list --repo "${{ github.repository }}" --state open --head "$HEAD_BRANCH" --json number --jq '.[0].number')

As per coding guidelines, "Treat ALL GitHub event data as potentially hostile input" and "Require strict allowlists or exact string matches."

Comment on lines +39 to +68
- name: Comment on PR
if: env.PR_NUMBER != ''
env:
FAILED_WORKFLOW_NAME: ${{ github.event.workflow_run.name || 'Manual Test Run' }}
FAILED_RUN_ID: ${{ github.event.inputs.failed_run_id || github.event.workflow_run.id }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
DRY_RUN: ${{ env.DRY_RUN }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number || '' }}
run: node .github/scripts/bot-workflows.js No newline at end of file
run: |
REPO="${{ github.repository }}"
COMMENT=$(cat <<EOF
Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md
- https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week
Thank you for contributing!
From the Hiero Python SDK Team
EOF
)
EXISTING_COMMENT=$(gh pr view "$PR_NUMBER" --repo "$REPO" --comments \
--json comments --jq ".comments[] | select(.body == \"${COMMENT//\"/\\\"}\") | .id")

if [ -z "$EXISTING_COMMENT" ]; then
gh pr comment "$PR_NUMBER" --repo "$REPO" --body "$COMMENT"
else
echo "Comment already exists, skipping."
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Duplicate comment detection is fragile and will likely fail.

The check on lines 61–62 attempts to match the exact multi-line comment body via jq string comparison after escaping double quotes. This is extremely brittle — any whitespace difference, trailing newline, or GitHub Markdown rendering artifact will cause a mismatch, resulting in duplicate comments on retries.

Use a hidden HTML marker (e.g., <!-- WorkflowBot -->) at the start of the comment body and check for that marker instead:

Proposed fix (marker-based dedup)
           COMMENT=$(cat <<EOF
+          <!-- WorkflowBot: workflow-failure-notifier -->
           Hi, this is WorkflowBot. 
           ...
           EOF
           )
-          EXISTING_COMMENT=$(gh pr view "$PR_NUMBER" --repo "$REPO" --comments \
-            --json comments --jq ".comments[] | select(.body == \"${COMMENT//\"/\\\"}\") | .id")
+          EXISTING_COMMENT=$(gh pr view "$PR_NUMBER" --repo "$REPO" --comments \
+            --json comments --jq '[.comments[] | select(.body | contains("<!-- WorkflowBot: workflow-failure-notifier -->"))] | length')

-          if [ -z "$EXISTING_COMMENT" ]; then
+          if [ "$EXISTING_COMMENT" = "0" ] || [ -z "$EXISTING_COMMENT" ]; then
             gh pr comment "$PR_NUMBER" --repo "$REPO" --body "$COMMENT"
           else
             echo "Comment already exists, skipping."
           fi

As per coding guidelines, "Duplicate prevention is REQUIRED: Marker-based comment detection."

Comment on lines +43 to +68
run: |
REPO="${{ github.repository }}"
COMMENT=$(cat <<EOF
Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md
- https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week
Thank you for contributing!
From the Hiero Python SDK Team
EOF
)
EXISTING_COMMENT=$(gh pr view "$PR_NUMBER" --repo "$REPO" --comments \
--json comments --jq ".comments[] | select(.body == \"${COMMENT//\"/\\\"}\") | .id")

if [ -z "$EXISTING_COMMENT" ]; then
gh pr comment "$PR_NUMBER" --repo "$REPO" --body "$COMMENT"
else
echo "Comment already exists, skipping."
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Logging is insufficient — add context to output.

When the comment is posted or skipped, the logs don't include the PR number, repository, triggering actor, or dry-run status. Add structured log lines so operators can diagnose issues without re-reading the workflow YAML.

As per coding guidelines, "Logs should include, where applicable: repository, workflow name, issue or PR number, triggering actor, dry-run status, decisions made (performed vs skipped)."

@exploreriii

Copy link
Copy Markdown
Contributor

Hi @Abhijeet2409 could you point us to the tests you have done to simualte this please?

@Abhijeet2409

Abhijeet2409 commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

Hey, thanks for the follow-up! I haven’t simulated this yet, but I’m testing it on my fork now and will share the results shortly. I focused on implementing the revert first and then moved to testing once you requested verification.

@Abhijeet2409

Copy link
Copy Markdown
Member Author

@exploreriii Tested successfully on my fork by creating a PR with intentionally failing checks. The workflow ran as expected.
Workflow run: https://github.com/Abhijeet2409/hiero-sdk-python/actions/runs/22142733036/job/64011127278
Test PR with bot comment: Abhijeet2409#5

Comment thread .github/workflows/bot-workflows.yml Outdated
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:
- https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi could you please check this section?
I think previously the links had this format

[Document Name](document URL)

right now in your workflow run, we see the raw URL which can be more user friendly
Thanks

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve pushed the requested changes.

Signed-off-by: Abhijeet <abhijeetsaharan2236@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

@@ -1,59 +1,68 @@
name: PythonBot - Workflow Failure Notifier
on:
workflow_dispatch:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

workflow_dispatch trigger is a dead trigger — the job condition always blocks it.

When triggered via workflow_dispatch, the github.event context is missing the workflow_run key completely. This means github.event.workflow_run.conclusion == 'failure' on line 17 always evaluates to false for manual dispatches, and the job never runs. Either remove workflow_dispatch entirely, or fix the job condition:

-    if: ${{ github.event.workflow_run.conclusion == 'failure' }}
+    if: ${{ github.event.workflow_run.conclusion == 'failure' || github.event_name == 'workflow_dispatch' }}

Also applies to: 17-17


⚠️ Potential issue | 🟠 Major

workflow_dispatch trigger is unreachable — the job condition always blocks it.

The job on line 17 gates on github.event.workflow_run.conclusion == 'failure'. For a workflow_dispatch event, github.event.workflow_run is absent and the expression evaluates to false, so the job never runs. Either remove the workflow_dispatch trigger entirely, or add a disjunct to the job condition:

-    if: ${{ github.event.workflow_run.conclusion == 'failure' }}
+    if: ${{ github.event.workflow_run.conclusion == 'failure' || github.event_name == 'workflow_dispatch' }}

Comment on lines 4 to 8
workflow_run:
workflows:
- "PR Formatting"
- "PR Changelog Check"
- "Hiero Solo Integration & Unit Tests"
- "Run Examples"
types:
- completed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

- completed is incorrectly placed under workflows: — it must be under types:.

on.<event_name>.types is a separate YAML key used to filter event activity types, and must appear as a sibling of workflows:, not as a child item within it. As written, completed is treated as a third workflow name (no workflow with that name exists), so the entry is silently ignored. The workflow happens to still fire on "PR Formatting" and "PR Changelog Check" completions only because by default, all activity types trigger workflows that run on this event — but the structure is wrong and misleading.

🐛 Proposed fix
   workflow_run:
     workflows:
       - "PR Formatting"
       - "PR Changelog Check"
-      - completed
+    types:
+      - completed
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
workflow_run:
workflows:
- "PR Formatting"
- "PR Changelog Check"
- "Hiero Solo Integration & Unit Tests"
- "Run Examples"
types:
- completed
workflow_run:
workflows:
- "PR Formatting"
- "PR Changelog Check"
types:
- completed

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

GitHub Actions workflow_run event types key syntax documentation

💡 Result:

For the workflow_run trigger, the activity types are set with the standard key on.workflow_run.types, and the supported values are:

  • completed
  • requested
  • in_progress [1]

Syntax (both forms are valid):

on:
  workflow_run:
    workflows: ["Build"]
    types: [completed]

or

on:
  workflow_run:
    workflows: ["Build"]
    types:
      - completed

[1]

GitHub’s general docs for the types key are under on.<event_name>.types in the workflow syntax reference. [2]

Sources: GitHub Docs: events that trigger workflows — workflow_run [1], GitHub Docs: workflow syntax — on.<event_name>.types / on.workflow_run... [2]


completed is misplaced under workflows: — it belongs under types: as a sibling key.

The current structure treats completed as a third workflow name instead of specifying the event type. While the default types value is [completed], making the workflow still trigger, the YAML structure itself is incorrect per GitHub Actions documentation. types: must be a sibling to workflows:, not nested within it.

🐛 Proposed fix
   workflow_run:
     workflows:
       - "PR Formatting"
       - "PR Changelog Check"
-      - completed
+  types:
+    - completed

Comment on lines 12 to 14
concurrency:
group: "workflow-failure-${{ github.event.workflow_run.head_branch || github.run_id }}"
group: "workflow-failure-${{ github.event.workflow_run.head_branch }}"
cancel-in-progress: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Concurrency group collapses for workflow_dispatch — the run_id fallback was removed.

When the trigger is workflow_dispatch, github.event.workflow_run.head_branch resolves to an empty string, making the group "workflow-failure-". All concurrent manual runs then cancel each other. Restore the || github.run_id fallback:

🛠️ Proposed fix
 concurrency:
-  group: "workflow-failure-${{ github.event.workflow_run.head_branch }}"
+  group: "workflow-failure-${{ github.event.workflow_run.head_branch || github.run_id }}"
   cancel-in-progress: true

⚠️ Potential issue | 🟡 Minor

Concurrency group loses the run_id fallback — collapses all workflow_dispatch runs.

With head_branch only, a workflow_dispatch trigger resolves to "workflow-failure-", collapsing all concurrent manual runs into the same group and causing them to cancel each other. Restore the fallback:

🛠️ Proposed fix
 concurrency:
-  group: "workflow-failure-${{ github.event.workflow_run.head_branch }}"
+  group: "workflow-failure-${{ github.event.workflow_run.head_branch || github.run_id }}"
   cancel-in-progress: true

Comment on lines +45 to +59
COMMENT=$(cat <<EOF
Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:
- [DCO signing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
- [Changelog guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)
- [Merge conflicts guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md)
- [Rebase guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md)
- [Testing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md)
- [Discord](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md)
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
Thank you for contributing!
From the Hiero Python SDK Team
EOF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Heredoc body inherits ~10 spaces of YAML indentation — every line of the comment is indented.

cat <<EOF preserves all leading whitespace verbatim. Lines starting with 4+ spaces are rendered as a code block in GitHub Markdown, which will break the comment's intended formatting. Left-justify the heredoc content (or use <<-EOF with tab-stripped indentation):

🛠️ Proposed fix
-          COMMENT=$(cat <<EOF
-          Hi, this is WorkflowBot. 
-          Your pull request cannot be merged as it is not passing all our workflow checks. 
-          Please click on each check to review the logs and resolve issues so all checks pass.
-          To help you:
-          - [DCO signing guide](...)
-          ...
-          Thank you for contributing!
-          From the Hiero Python SDK Team
-          EOF
-          )
+          COMMENT=$(cat <<'EOF'
+Hi, this is WorkflowBot.
+Your pull request cannot be merged as it is not passing all our workflow checks.
+Please click on each check to review the logs and resolve issues so all checks pass.
+To help you:
+- [DCO signing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
+- [Changelog guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)
+- [Merge conflicts guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md)
+- [Rebase guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md)
+- [Testing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md)
+- [Discord](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md)
+- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
+Thank you for contributing!
+From the Hiero Python SDK Team
+EOF
+          )

Note: Using <<'EOF' (single-quoted) also prevents shell expansion inside the heredoc body, which avoids any accidental substitution in the comment text.


⚠️ Potential issue | 🟠 Major

Heredoc indentation bleeds leading whitespace into the posted comment.

The comment body lines are indented to match YAML indentation (~10 spaces). cat <<EOF preserves all leading whitespace verbatim, so every line in the posted PR comment will start with those spaces. Markdown renders a 4-space-or-more indent as a code block, which will break the formatting.

Use a dedenting heredoc (<<-EOF with tabs, or strip via sed), or left-justify the heredoc content:

🛠️ Proposed fix
-        run: |
-          REPO="${{ github.repository }}"
-          COMMENT=$(cat <<EOF
-          Hi, this is WorkflowBot. 
-          Your pull request cannot be merged ...
-          ...
-          EOF
-          )
+        run: |
+          REPO="${{ github.repository }}"
+          COMMENT=$(cat <<'EOF'
+Hi, this is WorkflowBot.
+Your pull request cannot be merged as it is not passing all our workflow checks.
+Please click on each check to review the logs and resolve issues so all checks pass.
+To help you:
+- [DCO signing guide](...)
+...
+Thank you for contributing!
+From the Hiero Python SDK Team
+EOF
+          )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
COMMENT=$(cat <<EOF
Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:
- [DCO signing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
- [Changelog guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)
- [Merge conflicts guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md)
- [Rebase guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md)
- [Testing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md)
- [Discord](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md)
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
Thank you for contributing!
From the Hiero Python SDK Team
EOF
COMMENT=$(cat <<'EOF'
Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:
- [DCO signing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
- [Changelog guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)
- [Merge conflicts guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md)
- [Rebase guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md)
- [Testing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md)
- [Discord](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/discord.md)
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
Thank you for contributing!
From the Hiero Python SDK Team
EOF
)

@github-actions

Copy link
Copy Markdown

Hi there! I'm the LinkedIssueBot.
This pull request has been automatically closed due to the following reason(s):

Thank you,
From Python SDK team

@github-actions github-actions Bot closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants