Skip to content

Commit 6d79778

Browse files
authored
Enhance OpenAPI workflow with auto-merge step (#745)
The key changes: Added "id: sync-openapi" to the Update OpenAPI Spec step Added a new "Enable auto-merge" step that runs `gh pr merge --auto --squash` on the created PR
1 parent dc2a640 commit 6d79778

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/update-openapi.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,16 @@ jobs:
1616
with:
1717
token: ${{ secrets.GITHUB_TOKEN }}
1818
- name: Update OpenAPI Spec
19+
id: sync-openapi
1920
uses: fern-api/sync-openapi@v2
2021
with:
2122
token: ${{ secrets.GITHUB_TOKEN }}
2223
branch: 'update-openapi-spec'
2324
update_from_source: true
24-
add_timestamp: true
25+
add_timestamp: true
26+
- name: Enable auto-merge
27+
if: steps.sync-openapi.outputs.pr_number != ''
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
gh pr merge ${{ steps.sync-openapi.outputs.pr_number }} --auto --squash

0 commit comments

Comments
 (0)