We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48726fd commit e73506eCopy full SHA for e73506e
.github/workflows/lint.yml
@@ -41,3 +41,14 @@ jobs:
41
run: tox -e isort -- --check
42
- name: Run pylint Python code static checker (https://github.com/PyCQA/pylint)
43
run: tox -e pylint
44
+ - name: Ensure no merge-commits in the Pull Request (PR)
45
+ if: github.event_name == 'pull_request'
46
+ run: |
47
+ HEAD_SHA="${{ github.event.pull_request.head.sha }}"
48
+ echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF}"
49
+ echo "HEAD_SHA: ${HEAD_SHA}"
50
+ MERGE_COMMITS=$(git rev-list --merges origin/${GITHUB_BASE_REF}..${HEAD_SHA})
51
+ if [[ -n "${MERGE_COMMITS}" ]]; then
52
+ echo "ERROR: The Pull Request (PR) contains a 'merge commit': ${MERGE_COMMITS}"
53
+ exit 1
54
+ fi
0 commit comments