File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 2424 update_from_source : true
2525 add_timestamp : true
2626 - name : Enable auto-merge
27- if : steps.sync-openapi.outputs.pr_number != ''
2827 env :
2928 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3029 run : |
31- gh pr merge ${{ steps.sync-openapi.outputs.pr_number }} --auto --squash
30+ # Wait a moment for PR to be fully created
31+ sleep 5
32+ # Get the most recent PR that starts with update-openapi-spec
33+ PR_NUMBER=$(gh pr list --head update-openapi-spec --json number,headRefName --jq 'map(select(.headRefName | startswith("update-openapi-spec"))) | .[0].number')
34+ if [ -n "$PR_NUMBER" ] && [ "$PR_NUMBER" != "null" ]; then
35+ echo "Found PR #$PR_NUMBER, enabling auto-merge"
36+ gh pr merge $PR_NUMBER --auto --squash
37+ else
38+ echo "No PR found for branch starting with update-openapi-spec"
39+ fi
You can’t perform that action at this time.
0 commit comments