You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check this first because it only costs 1 API point.
311
+
try:
312
+
ifself.repo.get_collaborator_permission(self.author) in ["admin", "write"]:
313
+
return
314
+
# There is a UnknownObjectException for this scenario, but this method
315
+
# does not use it.
316
+
exceptgithub.GithubExceptionase:
317
+
# 404 means the author was not found in the collaborator list, so we
318
+
# know they don't have push permissions. Anything else is a real API
319
+
# issue, raise it so it is visible.
320
+
ife.status!=404:
321
+
raisee
322
+
323
+
# A review can be approved more than once, only comment the first time.
324
+
forcommentinself.pr.as_issue().get_comments():
325
+
ifself.COMMENT_TAGincomment.body:
326
+
return
327
+
328
+
# This text is using Markdown formatting.
329
+
comment=f"""\
330
+
{self.COMMENT_TAG}
331
+
@{self.author} you do not have permissions to merge your own PRs yet. Please let us know when you are happy for this to be merged, and one of the reviewers can merge it on your behalf.
332
+
333
+
(if many approvals are required, please wait until everyone has approved before merging)
334
+
"""
335
+
self.pr.as_issue().create_comment(comment)
336
+
returnTrue
337
+
338
+
301
339
defsetup_llvmbot_git(git_dir="."):
302
340
"""
303
341
Configure the git repo in `git_dir` with the llvmbot account so
0 commit comments