mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-25 14:59:36 +03:00
feat: create a PR when building the LeetCode directory (#1231)
* updating DIRECTORY.md * feat: create a PR when building the LeetCode directory * updating DIRECTORY.md --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
This commit is contained in:
parent
f3a3e6d476
commit
f9c89a720d
23
.github/workflows/leetcode_directory_writer.yml
vendored
23
.github/workflows/leetcode_directory_writer.yml
vendored
@ -18,13 +18,22 @@ jobs:
|
|||||||
- name: Add python dependencies
|
- name: Add python dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install requests
|
pip install requests
|
||||||
- name: Write leectode DIRECTORY.md
|
- name: Write LeetCode DIRECTORY.md
|
||||||
run: |
|
run: |
|
||||||
python3 scripts/leetcode_directory_md.py 2>&1 | tee leetcode/DIRECTORY.md
|
python3 scripts/leetcode_directory_md.py 2>&1 | tee leetcode/DIRECTORY.md
|
||||||
git config --global user.name github-actions[bot]
|
git pull || true
|
||||||
git config --global user.email 'github-actions@users.noreply.github.com'
|
- name: Commit and push changes
|
||||||
- name: Update LeetCode's directory
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
id: commit-push
|
||||||
|
with:
|
||||||
|
commit_message: "docs: updating `leetcode/DIRECTORY.md`"
|
||||||
|
branch: "leetcode-directory-${{ github.sha }}"
|
||||||
|
create_branch: true
|
||||||
|
- name: Creating and merging the PR
|
||||||
|
shell: bash
|
||||||
|
if: steps.commit-push.outputs.changes_detected == 'true'
|
||||||
run: |
|
run: |
|
||||||
git add leetcode/DIRECTORY.md
|
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).'
|
||||||
git commit -am "updating DIRECTORY.md" || true
|
gh pr merge --admin --merge --subject 'docs: updating `leetcode/DIRECTORY.md' --delete-branch
|
||||||
git push origin HEAD:$GITHUB_REF || true
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
## Audio
|
## Audio
|
||||||
* [Alaw](https://github.com/TheAlgorithms/C/blob/HEAD/audio/alaw.c)
|
* [Alaw](https://github.com/TheAlgorithms/C/blob/HEAD/audio/alaw.c)
|
||||||
|
|
||||||
|
## Cipher
|
||||||
|
* [Rot13](https://github.com/TheAlgorithms/C/blob/HEAD/cipher/rot13.c)
|
||||||
|
|
||||||
## Client Server
|
## Client Server
|
||||||
* [Client](https://github.com/TheAlgorithms/C/blob/HEAD/client_server/client.c)
|
* [Client](https://github.com/TheAlgorithms/C/blob/HEAD/client_server/client.c)
|
||||||
* [Remote Command Exec Udp Client](https://github.com/TheAlgorithms/C/blob/HEAD/client_server/remote_command_exec_udp_client.c)
|
* [Remote Command Exec Udp Client](https://github.com/TheAlgorithms/C/blob/HEAD/client_server/remote_command_exec_udp_client.c)
|
||||||
@ -359,7 +362,6 @@
|
|||||||
* [Poly Add](https://github.com/TheAlgorithms/C/blob/HEAD/misc/poly_add.c)
|
* [Poly Add](https://github.com/TheAlgorithms/C/blob/HEAD/misc/poly_add.c)
|
||||||
* [Postfix Evaluation](https://github.com/TheAlgorithms/C/blob/HEAD/misc/postfix_evaluation.c)
|
* [Postfix Evaluation](https://github.com/TheAlgorithms/C/blob/HEAD/misc/postfix_evaluation.c)
|
||||||
* [Quartile](https://github.com/TheAlgorithms/C/blob/HEAD/misc/quartile.c)
|
* [Quartile](https://github.com/TheAlgorithms/C/blob/HEAD/misc/quartile.c)
|
||||||
* [Rot13](https://github.com/TheAlgorithms/C/blob/HEAD/misc/rot13.c)
|
|
||||||
* [Rselect](https://github.com/TheAlgorithms/C/blob/HEAD/misc/rselect.c)
|
* [Rselect](https://github.com/TheAlgorithms/C/blob/HEAD/misc/rselect.c)
|
||||||
* [Run Length Encoding](https://github.com/TheAlgorithms/C/blob/HEAD/misc/run_length_encoding.c)
|
* [Run Length Encoding](https://github.com/TheAlgorithms/C/blob/HEAD/misc/run_length_encoding.c)
|
||||||
* [Shunting Yard](https://github.com/TheAlgorithms/C/blob/HEAD/misc/shunting_yard.c)
|
* [Shunting Yard](https://github.com/TheAlgorithms/C/blob/HEAD/misc/shunting_yard.c)
|
||||||
|
Loading…
Reference in New Issue
Block a user