my file format looks like this report_10_04_2019_18_10_38
. I want to check every time if there is a new file and if exist a new file sends to my private repo. I want to keep looking for new files and every 15 minutes or 1 hour send the files back to my repo, but how can I do it?
import datetime
from github import Github
repository = "xxxxxxxxx/xxxxxxxxx"
commit_message = "hello"
crashes = "xxxx/xxxx.html"
g = Github("xxxxxxxxxxxx")
repo = g.get_repo(repository)
while True:
repo.create_file(crashes, commit_message, "test")