From 7566684749b91d8454302b395dc788b7dfa834b9 Mon Sep 17 00:00:00 2001 From: Aaron Meese Date: Mon, 10 Aug 2020 08:16:13 -0500 Subject: [PATCH] Lines of Code committer It worked for the README, so let's see if it works for the charts. --- loc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/loc.py b/loc.py index e46151c..a40c383 100644 --- a/loc.py +++ b/loc.py @@ -81,10 +81,11 @@ class LinesOfCode: def pushChart(self): repo = self.g.get_repo(f"{self.username}/{self.username}") + committer = InputGitAuthor('readme-bot', 'readme-bot@example.com') with open('bar_graph.png', 'rb') as input_file: data = input_file.read() try: contents = repo.get_contents("charts/bar_graph.png") - repo.update_file(contents.path, "Charts Added", data, contents.sha) + repo.update_file(contents.path, "Charts Updated", data, contents.sha, committer) except Exception as e: - repo.create_file("charts/bar_graph.png", "Initial Commit", data) + repo.create_file("charts/bar_graph.png", "Charts Added", data, committer)