зеркало из https://github.com/github/docs.git
This commit is contained in:
Родитель
b850d4360e
Коммит
cc4fe656a8
|
@ -53,22 +53,22 @@ jobs:
|
|||
- name: Decorate the dereferenced OpenAPI schemas
|
||||
run: script/rest/update-files.js --decorate-only
|
||||
|
||||
- name: Check if pull request should be closed
|
||||
id: close-pr
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
echo "If there are no changes, exit"
|
||||
NUM_FILES_CHANGED=$(git diff --name-only -- lib/rest/static/decorated | wc -l)
|
||||
if [[ $NUM_FILES_CHANGED -eq 0 ]]
|
||||
then
|
||||
echo "No decorated file changes found"
|
||||
gh pr comment "$PR_URL" --body "🤖 This pull request has no changes to lib/rest/static/decorated, so it is being closed automatically."
|
||||
gh pr close "$PR_URL" --delete-branch
|
||||
echo "NO_DECORATED=true" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
# - name: Check if pull request should be closed
|
||||
# id: close-pr
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
# run: |
|
||||
# echo "If there are no changes, exit"
|
||||
# NUM_FILES_CHANGED=$(git diff --name-only -- lib/rest/static/decorated | wc -l)
|
||||
# if [[ $NUM_FILES_CHANGED -eq 0 ]]
|
||||
# then
|
||||
# echo "No decorated file changes found"
|
||||
# gh pr comment "$PR_URL" --body "🤖 This pull request has no changes to lib/rest/static/decorated, so it is being closed automatically."
|
||||
# gh pr close "$PR_URL" --delete-branch
|
||||
# echo "NO_DECORATED=true" >> $GITHUB_OUTPUT
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
- name: Check in the decorated files
|
||||
if: ${{ steps.close-pr.outputs.NO_DECORATED != 'true' }}
|
||||
|
|
Загрузка…
Ссылка в новой задаче