File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - name : Check PR source branch
12+ env :
13+ IS_FORK : ${{ github.event.pull_request.head.repo.fork }}
14+ HEAD_REF : ${{ github.event.pull_request.head.ref }}
1215 run : |
1316 # Check if PR is from a fork
14- if [[ "${{ github.event.pull_request.head.repo.fork } }" == "true" ]]; then
17+ if [[ "${IS_FORK }" == "true" ]]; then
1518 # Check if PR is from the master/main branch of a fork
16- if [[ "${{ github.event.pull_request.head.ref }} " == "master" || "${{ github.event.pull_request.head.ref } }" == "main" ]]; then
19+ if [[ "${HEAD_REF} " == "master" || "${HEAD_REF }" == "main" ]]; then
1720 echo "ERROR: Pull requests from the master/main branch of forks are not allowed, because it prevents maintainers from contributing to your PR"
1821 echo "Please create a feature branch in your fork and submit the PR from that branch instead."
1922 exit 1
You can’t perform that action at this time.
0 commit comments