|
66 | 66 | ls -la ./
|
67 | 67 | rm -rf ./* || true
|
68 | 68 |
|
69 |
| - - uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v2.0.0 |
70 |
| - id: comment-branch |
71 |
| - if: ${{ always() && inputs.trigger != 'schedule' }} |
72 |
| - |
73 | 69 | - name: Add comment to PR
|
74 | 70 | uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
75 | 71 | if: ${{ always() && inputs.trigger != 'schedule' }}
|
|
90 | 86 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
91 | 87 | with:
|
92 | 88 | path: ur-repo
|
93 |
| - ref: ${{ steps.comment-branch.outputs.head_ref }} |
| 89 | + |
| 90 | + # On issue_comment trigger (for PRs) we need to fetch special ref for |
| 91 | + # proper PR's merge commit. Note, this ref may be absent if the PR is already merged. |
| 92 | + - name: Fetch PR's merge commit |
| 93 | + if: ${{ inputs.trigger != 'schedule' }} |
| 94 | + working-directory: ${{github.workspace}}/ur-repo |
| 95 | + env: |
| 96 | + PR_NO: ${{github.event.issue.number}} |
| 97 | + run: | |
| 98 | + git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/* |
| 99 | + git checkout origin/pr/${PR_NO}/merge |
| 100 | + git rev-parse origin/pr/${PR_NO}/merge |
94 | 101 |
|
95 | 102 | - name: Checkout SYCL
|
96 | 103 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
@@ -191,8 +198,9 @@ jobs:
|
191 | 198 | script: |
|
192 | 199 | const adapter = '${{ matrix.adapter.name }}';
|
193 | 200 | const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
|
194 |
| - const status = '${{ steps.tests.outcome }}'; |
195 |
| - const body = `E2E ${adapter} build: \n${url}\n Status: ${status}`; |
| 201 | + const test_status = '${{ steps.tests.outcome }}'; |
| 202 | + const job_status = '${{ job.status }}'; |
| 203 | + const body = `E2E ${adapter} build:\n${url}\nJob status: ${job_status}. Test status: ${test_status}`; |
196 | 204 |
|
197 | 205 | github.rest.issues.createComment({
|
198 | 206 | issue_number: context.issue.number,
|
|
0 commit comments