File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1111SUCCESS_STR : str = "success"
1212FAILURE_STR : str = "failure"
1313QUEUED_STR : str = "queued"
14+ APPROVED : str = "APPROVED"
1415
1516SUPPORTED_LABELS : set [str ] = {
1617 f"{ LABEL_PREFIX } { WIP_LABEL_STR } " ,
Original file line number Diff line number Diff line change 2020 SUPPORTED_LABELS ,
2121 VERIFIED_LABEL_STR ,
2222 WELCOME_COMMENT ,
23+ APPROVED ,
2324)
2425from github import Github , UnknownObjectException
2526from simple_logger .logger import get_logger
@@ -264,7 +265,7 @@ def pull_request_review_label_actions(
264265 label_to_remove = None
265266 label_to_add = None
266267
267- if self .review_state == " APPROVED" :
268+ if self .review_state == APPROVED :
268269 label_to_remove = change_requested_label
269270 label_to_add = lgtm_label
270271
@@ -339,7 +340,7 @@ def dismiss_pr_approval(self) -> None:
339340 LOGGER .info (f"Looking for approving review by user { current_user } " )
340341 # The reviews are paginated in chronological order. We need to get the newest by our account
341342 for review in all_reviews .reversed :
342- if review .user .login == current_user and review .state == " APPROVED" :
343+ if review .user .login == current_user and review .state == APPROVED :
343344 LOGGER .info (f"found review by user { current_user } with id { review .id } " )
344345 review .dismiss (message = "Dismissing review due to '/lgtm cancel' comment" )
345346
You can’t perform that action at this time.
0 commit comments