Skip to content

Commit 190e8a0

Browse files
committed
formatting, GH_TOKEN
Signed-off-by: nadineloepfe <nadine.loepfe@swirldslabs.com>
1 parent da353b2 commit 190e8a0

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed
Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: PythonBot - Workflow Failure Notifier
2-
32
on:
43
workflow_dispatch:
54
workflow_run:
@@ -9,52 +8,48 @@ on:
98
- "Run Examples"
109
types:
1110
- completed
12-
1311
permissions:
1412
contents: read
1513
pull-requests: write
16-
1714
jobs:
1815
notify-pr:
1916
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
2017
runs-on: ubuntu-latest
2118
steps:
2219
- name: Get associated PR number
2320
id: get-pr
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2423
run: |
25-
# Get "id" from the workflow run
24+
# Get branch from the workflow run
2625
HEAD_BRANCH=$(gh run view ${{ github.event.workflow_run.id }} \
2726
--repo ${{ github.repository }} \
2827
--json headBranch --jq '.headBranch')
29-
28+
3029
# Find the PR number for this branch
3130
PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --state all --head "$HEAD_BRANCH" --json number --jq '.[0].number')
32-
3331
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
34-
35-
32+
3633
- name: Comment on PR
3734
if: env.PR_NUMBER != ''
3835
env:
3936
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4037
run: |
4138
REPO="${{ github.repository }}"
42-
COMMENT=$(cat <<EOF
43-
Hi, this is WorkflowBot.
44-
Your pull request cannot be merged as it is not passing all our workflow checks.
45-
Please click on each check to review the logs and resolve issues so all checks pass.
46-
47-
To help you:
48-
- [DCO signing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
49-
- [Changelog guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)
50-
- [Merge conflicts guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md)
51-
- [Rebase guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md)
52-
- [Testing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md)
53-
- [Discord](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md)
54-
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
55-
56-
Thank you for contributing!
57-
From the Hiero Python SDK Team
39+
COMMENT=$(cat <<EOF
40+
Hi, this is WorkflowBot.
41+
Your pull request cannot be merged as it is not passing all our workflow checks.
42+
Please click on each check to review the logs and resolve issues so all checks pass.
43+
To help you:
44+
- [DCO signing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
45+
- [Changelog guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md)
46+
- [Merge conflicts guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/merge_conflicts.md)
47+
- [Rebase guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/rebasing.md)
48+
- [Testing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/testing.md)
49+
- [Discord](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md)
50+
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
51+
Thank you for contributing!
52+
From the Hiero Python SDK Team
5853
EOF
59-
)
60-
gh pr comment "$PR_NUMBER" --repo "$REPO" --body "$COMMENT"
54+
)
55+
gh pr comment "$PR_NUMBER" --repo "$REPO" --body "$COMMENT"

0 commit comments

Comments
 (0)