Other way to get commit msg; try to fix log url

This commit is contained in:
probonopd authored and GitHub committed 2023-07-15 13:24:51 +02:00
1 parent 9afb8f6d72
commit 138cd5e06e
1 file changed
+2 -2
+2 -2
View File
@@ -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,