diff --git a/.github/workflows/mocha.yml b/.github/workflows/mocha.yml index 3cdb3b5f52..4e65c6b8f0 100644 --- a/.github/workflows/mocha.yml +++ b/.github/workflows/mocha.yml @@ -6,14 +6,13 @@ name: Tests - opened - synchronize - reopened - branches: - # Branches from forks have the form 'user:branch-name' - - '**:**' jobs: prepare-commit-msg: name: Retrieve head commit message runs-on: ubuntu-latest + # Run 'pull-request' event only on external PRs from forked repos. + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository outputs: HEAD_COMMIT_MSG: '${{ steps.commitMsg.outputs.HEAD_COMMIT_MSG }}' steps: