From 77522fdbc1d9960147032316cb00c47cfe3acb67 Mon Sep 17 00:00:00 2001 From: David Leal Date: Tue, 18 Jul 2023 20:41:49 -0600 Subject: [PATCH] fix: LeetCode directory writer (#1281) --- .github/workflows/leetcode_directory_writer.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/leetcode_directory_writer.yml b/.github/workflows/leetcode_directory_writer.yml index a1189165..9d4ab38b 100644 --- a/.github/workflows/leetcode_directory_writer.yml +++ b/.github/workflows/leetcode_directory_writer.yml @@ -33,13 +33,13 @@ jobs: shell: bash run: | git checkout -b leetcode-directory-${{ github.sha }} - git commit -m "docs: updating `leetcode/DIRECTORY.md` + git commit -m "docs: updating `leetcode/DIRECTORY.md`" git push origin leetcode-directory-${{ github.sha }}:leetcode-directory-${{ github.sha }} - name: Creating the pull request shell: bash run: | - if [[ `git status --porcelain` ]]; then - gh pr create --base ${GITHUB_REF##*/} --head leetcode-directory-${{ github.sha }} --title 'docs: updating `leetcode/DIRECTORY.md`' --body 'Updated LeetCode directory (see the diff. for changes).' + if [[ $(git log --branches --not --remotes) ]]; then + gh pr create --base ${GITHUB_REF##*/} --head leetcode-directory-${{ github.sha }} --title 'docs: updating `leetcode/DIRECTORY.md`' --body 'Updated LeetCode directory (see the diff. for changes).' || true fi env: GH_TOKEN: ${{ github.token }}