Skip to content

Commit

Permalink
feat: Try to submit review before exit
Browse files Browse the repository at this point in the history
Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
  • Loading branch information
narendasan committed Apr 21, 2021
1 parent f70bed6 commit 9a9d7f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/run_cpp_linter.py
Expand Up @@ -23,8 +23,10 @@
if output.returncode != 0:
comment = '''There are some changes that do not conform to C++ style guidelines:\n ```diff\n{}```'''.format(output.stdout.decode("utf-8"))
approval = 'REQUEST_CHANGES'
exit(1)

pr.create_review(commit, comment, approval)


if output.returncode != 0:
exit(1)
else:
exit(0)
6 changes: 5 additions & 1 deletion .github/scripts/run_py_linter.py
Expand Up @@ -23,6 +23,10 @@
if output.returncode != 0:
comment = '''There are some changes that do not conform to Python style guidelines:\n ```diff\n{}```'''.format(output.stdout.decode("utf-8"))
approval = 'REQUEST_CHANGES'
exit(1)

pr.create_review(commit, comment, approval)

if output.returncode != 0:
exit(1)
else:
exit(0)

0 comments on commit 9a9d7f0

Please sign in to comment.