@@ -57,22 +57,22 @@ jobs:
5757 - name : Decorate the dereferenced OpenAPI schemas
5858 run : script/rest/update-files.js --decorate-only
5959
60- # - name: Check if pull request should be closed
61- # id: close-pr
62- # env:
63- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64- # PR_URL: ${{ github.event.pull_request.html_url }}
65- # run: |
66- # echo "If there are no changes, exit"
67- # NUM_FILES_CHANGED=$(git diff --name-only -- lib/rest/static/decorated | wc -l)
68- # if [[ $NUM_FILES_CHANGED -eq 0 ]]
69- # then
70- # echo "No decorated file changes found"
71- # gh pr comment "$PR_URL" --body "🤖 This pull request has no changes to lib/rest/static/decorated, so it is being closed automatically."
72- # gh pr close "$PR_URL" --delete-branch
73- # echo "NO_DECORATED=true" >> $GITHUB_OUTPUT
74- # exit 0
75- # fi
60+ - name : Check if pull request should be closed
61+ id : close-pr
62+ env :
63+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64+ PR_URL : ${{ github.event.pull_request.html_url }}
65+ run : |
66+ echo "If there are no changes, exit"
67+ NUM_FILES_CHANGED=$(git diff --name-only -- lib/rest/static/decorated | wc -l)
68+ if [[ $NUM_FILES_CHANGED -eq 0 ]]
69+ then
70+ echo "No decorated file changes found"
71+ gh pr comment "$PR_URL" --body "🤖 This pull request has no changes to lib/rest/static/decorated, so it is being closed automatically."
72+ gh pr close "$PR_URL" --delete-branch
73+ echo "NO_DECORATED=true" >> $GITHUB_OUTPUT
74+ exit 0
75+ fi
7676
7777 - name : Check in the decorated files
7878 if : ${{ steps.close-pr.outputs.NO_DECORATED != 'true' }}
0 commit comments