Skip to content

Commit f3ae50d

Browse files
node9aiclaude
andauthored
fix: skip PR creation when dev has no new commits vs main (#9)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3e9a9e2 commit f3ae50d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/auto-pr.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
> - `feat:` to publish a Minor release (0.X.0)
2727
> If it starts with `chore:`, no PyPI package will be published!
2828
run: |
29+
git fetch origin main
30+
COMMITS=$(git log origin/main..origin/dev --oneline | wc -l)
31+
if [ "$COMMITS" -eq 0 ]; then
32+
echo "No commits between dev and main — nothing to release, skipping PR."
33+
exit 0
34+
fi
2935
PR=$(gh pr list --base main --head dev --state open --json number -q '.[0].number')
3036
if [ -z "$PR" ]; then
3137
gh pr create \

0 commit comments

Comments
 (0)