Skip to content

Commit a91cbe4

Browse files
vaadin-botZheSun88claude
authored
chore: enable auto-merge after @NpmPackage 24h gate (CI) (#9521)
The @NpmPackage 24h gate already dismisses its block review and approves the PR after 24 hours, but someone still has to click merge. These bot-generated NpmPackages PRs are routine, so the merge should happen on its own. ## Changes After approving, the `wait-and-unblock` job now also enables auto-merge: ```sh gh pr merge "$PR_NUMBER" --repo "$REPO" --auto --squash ``` - **Squash** because the repo disallows merge commits (`allow_merge_commit: false`). - Best-effort: a failure (PR already merged, or no pending required checks) only logs a warning, so the job stays green. - The block message now states it will also enable auto-merge. Auto-merge is already allowed at the repo level (`allow_auto_merge: true`), so the PR merges by itself once all required checks pass. Follow-up to #9517 --- 🤖 Generated with Claude Code Co-authored-by: Zhe Sun <zhe@vaadin.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3a0b286 commit a91cbe4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/npm-package-gate.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
**No action needed — this is fully automated:**
5252
- I posted this block automatically when CI detected the `@NpmPackage` version bump.
53-
- **24 hours after this message**, I will automatically dismiss this review and approve the PR, making it mergeable.
53+
- **24 hours after this message**, I will automatically dismiss this review, approve the PR, and enable auto-merge (squash) so it merges as soon as all required checks pass.
5454
5555
**What affects the 24h timer:**
5656
- New commits / pushes **do not** reset it — the countdown is anchored to this message, so it keeps running no matter how many times you push.
@@ -100,3 +100,6 @@ jobs:
100100
gh api -X POST "repos/$REPO/pulls/$PR_NUMBER/reviews" \
101101
-f event=APPROVE \
102102
-f body="Automatically approved 24 hours after the @NpmPackage version bump block."
103+
echo "Enabling auto-merge for PR #$PR_NUMBER"
104+
gh pr merge "$PR_NUMBER" --repo "$REPO" --auto --squash \
105+
|| echo "::warning::Could not enable auto-merge for PR #$PR_NUMBER (already merged, or no pending required checks)."

0 commit comments

Comments
 (0)