Updated code to do commit only if readme changed

This commit is contained in:
Gautam krishna R 2020-07-10 17:33:04 +05:30 committed by GitHub
parent 66fb6bbc52
commit 8e15ddefda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,5 +53,6 @@ if __name__ == '__main__':
stats = getStats()
rdmd = decodeReadme(contents.content)
newreadme = generatenewReadme(stats=stats, readme=rdmd)
repo.update_file(path=contents.path, message="Updated with Dev Metrics",
if newreadme != rdmd:
repo.update_file(path=contents.path, message="Updated with Dev Metrics",
content=newreadme, sha=contents.sha, branch="master")