mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-18 03:23:37 +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
|
name: Pull Request Validation
|
||||||
"on":
|
"on":
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened, edited]
|
types: [opened, synchronize, reopened, edited, auto_merge_enabled, auto_merge_disabled]
|
||||||
branches: [main]
|
branches: [main]
|
||||||
jobs:
|
jobs:
|
||||||
# Count the number of commits in a pull request. This can be
|
# Count the number of commits in a pull request. This can be
|
||||||
@ -36,7 +36,8 @@ jobs:
|
|||||||
BODY: ${{ github.event.pull_request.body }}
|
BODY: ${{ github.event.pull_request.body }}
|
||||||
run: |
|
run: |
|
||||||
echo "$BODY" | egrep -qsi '^disable-check:.*\<commit-count\>'
|
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 }}
|
base=${{ github.event.pull_request.base.sha }}
|
||||||
head=${{ github.event.pull_request.head.sha }}
|
head=${{ github.event.pull_request.head.sha }}
|
||||||
count=`git rev-list --count $base..$head`
|
count=`git rev-list --count $base..$head`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user