From 667235b65ec89cca1fa0c5ba14fb6d618a1262ff Mon Sep 17 00:00:00 2001 From: Andrii Nikitin Date: Wed, 7 Oct 2020 08:10:30 +0200 Subject: [PATCH] Do not try to push empty changes in rabbit-repoid --- gocd/rabbit-repoid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gocd/rabbit-repoid.py b/gocd/rabbit-repoid.py index 412f5a57..d9f5e6b0 100755 --- a/gocd/rabbit-repoid.py +++ b/gocd/rabbit-repoid.py @@ -91,7 +91,7 @@ class Listener(PubSubConsumer): return def push_git(self, message): - cmd = '(git add . && git commit -m "{}" && git push) > /dev/null' + cmd = 'git add . && git diff --exit-code --quiet HEAD || ( git commit -m "{}" && git push ) > /dev/null' subprocess.run(cmd.format(message), shell=True, check=True) def update_repo(self, project, repository):