fix(ci): don't post diff comments when there's no content

This commit is contained in:
Łukasz Mierzwa
2020-05-24 16:57:03 +01:00
committed by Łukasz Mierzwa
parent 5c01f501c1
commit 4a718cb076
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -224,4 +224,5 @@ if __name__ == '__main__':
sys.exit(1)
diffs = diffBundles(bundleA, bundleB)
printDiff(diffs)
if diffs:
printDiff(diffs)
+4
View File
@@ -82,6 +82,10 @@ if __name__ == '__main__':
with open(commentFile) as f:
comment = f.read()
if not comment:
print('{path} is empty, exiting'.format(path=commentFile))
sys.exit(0)
if format == 'noformat':
comment = '```\n{body}\n```'.format(body=comment)