[llvm] github-automation: Use a single comment for team mentions on pull req… (PR #66037)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 20:27:18 PDT 2023
================
@@ -83,6 +83,15 @@ def __init__(self, token: str, repo: str, pr_number: int, label_name: str):
self.org = github.Github(token).get_organization(self.repo.organization.login)
self.pr = self.repo.get_issue(pr_number).as_pull_request()
self._team_name = "pr-subscribers-{}".format(label_name).lower()
+ self.COMMENT_TAG = "<!--LLVM PR SUMMARY COMMENT-->\n"
+
+ def get_summary_comment(self) -> github.IssueComment.IssueComment:
+ for comment in self.pr.as_issue().get_comments():
+ if not self.COMMENT_TAG in comment.body:
+ continue
+ return comment
----------------
joker-eph wrote:
```suggestion
if self.COMMENT_TAG in comment.body:
return comment
```
https://github.com/llvm/llvm-project/pull/66037
More information about the llvm-commits
mailing list