Skip to content

Commit 384803d

Browse files
Handle different statuses for the workflow
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Generated-by: Cursor AI
1 parent cd86802 commit 384803d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/trigger-rebase.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ jobs:
7777
TARGET_REPO: ${{ github.repository }}
7878
SKILL_SOURCE: target_project
7979
SKILL_PATH: .claude/skills/test-pr.md
80-
run: ./run.sh -v 2>&1 | tee /tmp/runner-output.txt
80+
run: |
81+
set -o pipefail
82+
./run.sh -v 2>&1 | tee /tmp/runner-output.txt
8183
8284
- name: Extract PR URL
8385
if: success()
@@ -95,9 +97,10 @@ jobs:
9597
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9698
PR_URL: ${{ steps.extract-pr.outputs.pr_url }}
9799
run: |
98-
BODY="Rebase workflow **succeeded**. [View run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
99100
if [ -n "$PR_URL" ]; then
100-
BODY="${BODY}\n\nCreated PR: ${PR_URL}"
101+
BODY="Rebase workflow **succeeded**. [View run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})\n\nCreated PR: ${PR_URL}"
102+
else
103+
BODY="**Warning**: Workflow completed but no PR was created. Something may have gone wrong. [View logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
101104
fi
102105
gh issue comment "${{ github.event.issue.number }}" \
103106
--repo "${{ github.repository }}" \

0 commit comments

Comments
 (0)