File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 4141 run : tox -e isort -- --check
4242 - name : Run pylint Python code static checker (https://github.com/PyCQA/pylint)
4343 run : tox -e pylint
44+ - name : Ensure no merge-commits in the Pull Request (PR)
45+ run : |
46+ set -x
47+ echo "event name is: ${{ github.event_name }}"
48+ git --version
49+ git log --oneline | head
50+ echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
51+ echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF}"
52+ echo "GITHUB_SHA: ${GITHUB_SHA}"
53+ echo "github.event.pull_request.head.sha: ${{ github.event.pull_request.head.sha }}"
54+ HEAD_SHA="${{ github.event.pull_request.head.sha }}"
55+ MERGE_COMMITS=$(git rev-list --merges origin/${GITHUB_BASE_REF}..${HEAD_SHA})
56+ if [[ -n "${MERGE_COMMITS}" ]]; then
57+ echo "ERROR: The Pull Request (PR) contains a 'merge commit': ${MERGE_COMMITS}"
58+ exit 1
59+ fi
60+ if : github.event_name == 'pull_request'
You can’t perform that action at this time.
0 commit comments