mirror of
https://github.com/prymitive/karma
synced 2026-08-17 11:27:01 +00:00
fix(ci): don't post diff comments when there's no content
This commit is contained in:
committed by
Łukasz Mierzwa
parent
5c01f501c1
commit
4a718cb076
@@ -224,4 +224,5 @@ if __name__ == '__main__':
|
||||
sys.exit(1)
|
||||
|
||||
diffs = diffBundles(bundleA, bundleB)
|
||||
printDiff(diffs)
|
||||
if diffs:
|
||||
printDiff(diffs)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user