From 8e15ddefda8d3575c4270c9c3e4c1e0994efdefa Mon Sep 17 00:00:00 2001 From: Gautam krishna R Date: Fri, 10 Jul 2020 17:33:04 +0530 Subject: [PATCH] Updated code to do commit only if readme changed --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 45b8e55..b698913 100644 --- a/main.py +++ b/main.py @@ -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")