Skip to content

Commit

Permalink
Daha detayli auto commit mesajlari
Browse files Browse the repository at this point in the history
  • Loading branch information
ogun committed Aug 13, 2024
1 parent abe0f0b commit 3068f2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json diff=gron
13 changes: 10 additions & 3 deletions .github/workflows/download-autocomplete-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Download and push autocomplete.json
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions:
contents: write
jobs:
Expand All @@ -18,7 +19,13 @@ jobs:
- name: Commit autocomplete.json
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name 'Github Actions'
git config --global user.email '[email protected]'
git commit -am "Automated download"
sudo apt install --no-install-recommends -y gron
git config diff.gron.textconv "f(){ gron --no-sort \$1 | sed -E 's/\\[[0-9]+\\]//g' | sed -E 's/^json = ..;$//g' ; }; f"
git config user.name 'Github Actions'
git config user.email '[email protected]'
echo "Automated download" > commit_msg.txt
echo "" >> commit_msg.txt
git diff -w --unified=0 sozluk/v12/src/v12.autocomplete.json | sed -E 's/^@.*//g' | sed -E 's/^-$//g' | sed -E 's/^$//g' >> commit_msg.txt
git add sozluk/v12/src/v12.autocomplete.json
git commit -F commit_msg.txt
git push

0 comments on commit 3068f2c

Please sign in to comment.