diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8208b19e..8282218d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: - name: Auto-cancel builds triggered by branch updates run: | env | grep -i branch || true - COMMIT_MSG="${{ github.event.pull_request.head.commit.message }}" + COMMIT_MSG="$(git show -s --format=%s)" if [[ $COMMIT_MSG == 'Merge branch'* ]]; then echo "The workflow will not run as the commit message starts with 'Merge branch'." exit 0 @@ -116,7 +116,7 @@ jobs: body: commentBody }); } else { - const runURL = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${{ github.run_number }}`; + const runURL = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }}`; const commentBody = `The test was unable to make a screenshot. Most likely, the test did not succeed. Please check the [logs of the test run](${runURL}).`; await github.issues.createComment({ owner: context.repo.owner,