Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit 30ce1f9

Browse files
authored
Merge pull request #44 from jcristau/diff
importer: skip creating a commit/PR if no changes were made
2 parents 7bf5678 + 429caf0 commit 30ce1f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mozxchannel/android/importer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ def main():
2323
subprocess.run(
2424
["git", "-C", args.dest, "add", "-v", "-A"], check=True
2525
)
26+
diff = subprocess.run(
27+
["git", "-C", args.dest, "diff", "--cached", "--exit-code"]
28+
)
29+
if diff.returncode == 0:
30+
print("No changes")
31+
return
2632
subprocess.run(
2733
["git", "-C", args.dest, "commit", "-m", "Import l10n."], check=True
2834
)

0 commit comments

Comments
 (0)