Skip to content

Commit 279f970

Browse files
authored
ci(regenerate): enable auto-merge on generated PRs (#88)
1 parent 4e05b3b commit 279f970

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/regenerate.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,24 @@ jobs:
236236
rm -f test-scenarios.yaml
237237
238238
- name: Create PR
239+
id: cpr
239240
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
240241
with:
241242
token: ${{ steps.app-token.outputs.token }}
242243
title: "chore: regenerate client from updated OpenAPI spec"
243244
branch: openapi-update-${{ github.run_id }}
244245
commit-message: "chore: regenerate client from OpenAPI spec"
245246
body: "Auto-generated from updated HotData OpenAPI spec."
247+
248+
# Enable native auto-merge (squash). Branch protection on main gates the
249+
# merge on the test checks (scenario-parity, integration) plus the org
250+
# Claude review check and its approving review, so this only merges once
251+
# everything is green and Claude has approved.
252+
- name: Enable auto-merge
253+
if: steps.cpr.outputs.pull-request-number
254+
env:
255+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
256+
run: |
257+
gh pr merge "${{ steps.cpr.outputs.pull-request-number }}" \
258+
--repo "${{ github.repository }}" \
259+
--squash --auto

0 commit comments

Comments
 (0)