Skip to content

Commit

Permalink
Improve logging a little bit, avoid double labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Jun 26, 2023
1 parent c64f929 commit 065b87a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/ci/workflow_approve_rerun_lambda/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,10 @@ def main(event):
changed_files = get_changed_files_for_pull_request(pull_request, token)
print(f"Totally have {len(changed_files)} changed files in PR:", changed_files)
if check_suspicious_changed_files(changed_files):
print(
f"Pull Request {pull_request['number']} has suspicious changes, "
"label it for manuall approve"
)
label_manual_approve(pull_request, token)
print(f"Pull Request {pull_request['number']} has suspicious changes")
if "manual approve" not in labels:
print("Label the PR as needed for manuall approve")
label_manual_approve(pull_request, token)
else:
print(f"Pull Request {pull_request['number']} has no suspicious changes")
approve_run(workflow_description, token)
Expand Down

0 comments on commit 065b87a

Please sign in to comment.