do not create PR when no changes required

This commit is contained in:
Artem Goncharov 2022-11-23 13:49:51 +01:00
parent 7c55f348e8
commit 5531b12800

View File

@ -120,6 +120,10 @@ def process_repositories(args, service):
dirs_exist_ok=True dirs_exist_ok=True
) )
repo_to.index.add([doc["rst_location"]]) repo_to.index.add([doc["rst_location"]])
if len(repo_to.index.diff("HEAD")) == 0:
# Nothing to commit
logging.debug("No changes.")
continue
repo_to.index.commit( repo_to.index.commit(
( (
f"Synchronize {doc['title']}\n\n" f"Synchronize {doc['title']}\n\n"