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 91cc5e5 commit 3f2453bCopy full SHA for 3f2453b
1 file changed
.github/workflows/merge-train-create-pr.yml
@@ -14,16 +14,19 @@ jobs:
14
15
steps:
16
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
17
+ with:
18
+ fetch-depth: 0
19
20
- name: Check if PR exists and create if needed
21
env:
22
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
23
run: |
24
branch="${{ github.ref_name }}"
25
- # Skip if this is a merge commit
- if [[ "${{ github.event.head_commit.message }}" == "Merge "* ]]; then
26
- echo "Skipping: This is a merge commit"
+ # Skip if this is a merge commit (check for multiple parents)
27
+ parent_count=$(git rev-list --parents -n 1 "${{ github.sha }}" | wc -w)
28
+ if [[ $parent_count -gt 2 ]]; then
29
+ echo "Skipping: This is a merge commit."
30
exit 0
31
fi
32
0 commit comments