fix: LeetCode directory writer (#1281)

This commit is contained in:
David Leal 2023-07-18 20:41:49 -06:00 committed by GitHub
parent 1a5b31d3d1
commit 77522fdbc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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 }}