File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def get_allowed_users(self) -> list[str]:
112112
113113 def verify_allowed_user (self ) -> None :
114114 allowed_users = self .get_allowed_users ()
115- if self .user_login not in users :
115+ if self .user_login not in allowed_users :
116116 LOGGER .info (f"User { self .user_login } is not allowed for this action. Exiting." )
117117 sys .exit (0 )
118118 LOGGER .info (f"User { self .user_login } is allowed" )
@@ -327,6 +327,9 @@ def add_welcome_comment(self) -> None:
327327 self .pr .create_issue_comment (body = WELCOME_COMMENT )
328328
329329 def approve_pr (self ) -> None :
330+ if self .user_login == self .pr .user .login :
331+ LOGGER .info ("PR submitter cannot trigger approval for their own PR" )
332+ return
330333 self .pr .create_review (event = "APPROVE" )
331334
332335 def dismiss_pr_approval (self ) -> None :
You can’t perform that action at this time.
0 commit comments