Do not try to push empty changes in rabbit-repoid

This commit is contained in:
Andrii Nikitin 2020-10-07 08:10:30 +02:00
parent c336e60c9d
commit 667235b65e

View File

@ -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):