mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
Allow multi-commit PRs with squash auto-merge (#6733)
It's convenient to squash the cleanup commits using the GitHub interface, but currently the PR validation prevents the squash merge from succeeding. Fix this.
This commit is contained in:
parent
b719787aa6
commit
8a9ba06ef9
5
.github/workflows/pr-validation.yaml
vendored
5
.github/workflows/pr-validation.yaml
vendored
@ -1,7 +1,7 @@
|
||||
name: Pull Request Validation
|
||||
"on":
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, edited]
|
||||
types: [opened, synchronize, reopened, edited, auto_merge_enabled, auto_merge_disabled]
|
||||
branches: [main]
|
||||
jobs:
|
||||
# Count the number of commits in a pull request. This can be
|
||||
@ -36,7 +36,8 @@ jobs:
|
||||
BODY: ${{ github.event.pull_request.body }}
|
||||
run: |
|
||||
echo "$BODY" | egrep -qsi '^disable-check:.*\<commit-count\>'
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $? -ne 0 ]] && [[ "${{ github.event.pull_request.auto_merge.merge_method }}" != "squash" ]]
|
||||
then
|
||||
base=${{ github.event.pull_request.base.sha }}
|
||||
head=${{ github.event.pull_request.head.sha }}
|
||||
count=`git rev-list --count $base..$head`
|
||||
|
Loading…
x
Reference in New Issue
Block a user