mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 13:38:12 +02:00
added return guard to remove indent level
This commit is contained in:
@ -347,25 +347,28 @@ def process_pull(
|
|||||||
if all(not comment.file.endswith(".java") for comment in entry.comments):
|
if all(not comment.file.endswith(".java") for comment in entry.comments):
|
||||||
# if the commented files are all not code related, why bother compiling and testing the code?
|
# if the commented files are all not code related, why bother compiling and testing the code?
|
||||||
pbar.update(5)
|
pbar.update(5)
|
||||||
else:
|
if entry.metadata.successful:
|
||||||
with build_handler:
|
entry.metadata.reason_for_failure = "Valid PR! But isn't code related though."
|
||||||
try:
|
return
|
||||||
for message, action in steps:
|
|
||||||
pbar.set_postfix(
|
with build_handler:
|
||||||
{
|
try:
|
||||||
"doing": message,
|
for message, action in steps:
|
||||||
"started at": datetime.now().strftime("%d/%m, %H:%M:%S"),
|
pbar.set_postfix(
|
||||||
}
|
{
|
||||||
)
|
"doing": message,
|
||||||
action()
|
"started at": datetime.now().strftime("%d/%m, %H:%M:%S"),
|
||||||
pbar.update(1)
|
}
|
||||||
except HandlerException as e:
|
)
|
||||||
entry.metadata.last_cmd_error_msg = str(e)
|
action()
|
||||||
entry.metadata.reason_for_failure = e.reason_for_failure
|
pbar.update(1)
|
||||||
entry.metadata.successful = False
|
except HandlerException as e:
|
||||||
finally:
|
entry.metadata.last_cmd_error_msg = str(e)
|
||||||
build_handler.clean_repo()
|
entry.metadata.reason_for_failure = e.reason_for_failure
|
||||||
reset_repo_to_latest_commit(repo_path)
|
entry.metadata.successful = False
|
||||||
|
finally:
|
||||||
|
build_handler.clean_repo()
|
||||||
|
reset_repo_to_latest_commit(repo_path)
|
||||||
|
|
||||||
if entry.metadata.successful:
|
if entry.metadata.successful:
|
||||||
entry.metadata.reason_for_failure = "Valid PR!" # was set to 'still processing', since it's done being processed and was successful, there are no reasons for failure
|
entry.metadata.reason_for_failure = "Valid PR!" # was set to 'still processing', since it's done being processed and was successful, there are no reasons for failure
|
||||||
|
Reference in New Issue
Block a user