Skip to content

Commit 77522fd

Browse files
authored
fix: LeetCode directory writer (#1281)
1 parent 1a5b31d commit 77522fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/leetcode_directory_writer.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
shell: bash
3434
run: |
3535
git checkout -b leetcode-directory-${{ github.sha }}
36-
git commit -m "docs: updating `leetcode/DIRECTORY.md`
36+
git commit -m "docs: updating `leetcode/DIRECTORY.md`"
3737
git push origin leetcode-directory-${{ github.sha }}:leetcode-directory-${{ github.sha }}
3838
- name: Creating the pull request
3939
shell: bash
4040
run: |
41-
if [[ `git status --porcelain` ]]; then
42-
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).'
41+
if [[ $(git log --branches --not --remotes) ]]; then
42+
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
4343
fi
4444
env:
4545
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)