update:fix the branch name

This commit is contained in:
Swenchao
2020-10-15 15:55:09 +08:00
parent 57395d3c28
commit cf51aa9096

View File

@@ -507,6 +507,11 @@ 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:
try:
repo.update_file(path=contents.path, message='Updated with Dev Metrics',
content=new_readme, sha=contents.sha, branch='master',
committer=committer)
except:
repo.update_file(path=contents.path, message='Updated with Dev Metrics', repo.update_file(path=contents.path, message='Updated with Dev Metrics',
content=new_readme, sha=contents.sha, branch='main', content=new_readme, sha=contents.sha, branch='main',
committer=committer) committer=committer)