You've already forked wakapi-readme-stats
Merge pull request #119 from Swenchao/master
update branch name to resolve the problem that the readme cannot be updated
This commit is contained in:
11
main.py
11
main.py
@@ -510,9 +510,14 @@ if __name__ == '__main__':
|
|||||||
new_readme = generate_new_readme(stats=waka_stats, readme=rdmd)
|
new_readme = generate_new_readme(stats=waka_stats, readme=rdmd)
|
||||||
committer = InputGitAuthor('readme-bot', 'readme-bot@example.com')
|
committer = InputGitAuthor('readme-bot', 'readme-bot@example.com')
|
||||||
if new_readme != rdmd:
|
if new_readme != rdmd:
|
||||||
repo.update_file(path=contents.path, message='Updated with Dev Metrics',
|
try:
|
||||||
content=new_readme, sha=contents.sha, branch='master',
|
repo.update_file(path=contents.path, message='Updated with Dev Metrics',
|
||||||
committer=committer)
|
content=new_readme, sha=contents.sha, branch='master',
|
||||||
|
committer=committer)
|
||||||
|
except:
|
||||||
|
repo.update_file(path=contents.path, message='Updated with Dev Metrics',
|
||||||
|
content=new_readme, sha=contents.sha, branch='main',
|
||||||
|
committer=committer)
|
||||||
print("Readme updated")
|
print("Readme updated")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|||||||
Reference in New Issue
Block a user