Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added git.ico
Binary file not shown.
14 changes: 13 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import yaml
from datetime import datetime
from git import Repo
from plyer import notification

FILE_TO_COMMIT_NAME: str = 'update_me.yaml'

def commit_notification():
notification.notify(
title='Daily Git Commit',
message='Daily Git commited successfully',
app_name='Daily-Git-Commit',
app_icon='git.ico',
timeout=10
)
return

def update_file_to_commit():
# read file contents to figure out how many times we commited.
with open(FILE_TO_COMMIT_NAME, 'r') as file:
Expand All @@ -23,4 +34,5 @@ def commit_repository(YAML_FILE):
origin.push()

if __name__ == '__main__':
commit_repository(update_file_to_commit())
commit_repository(update_file_to_commit())
commit_notification()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
GitPython==3.1.14
PyYAML==5.4.1
plyer==2.1.0