[llvm] github-automation: Use a single comment for team mentions on pull requests (PR #66037)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 01:16:14 PDT 2023


================
@@ -131,10 +139,12 @@ def run(self) -> bool:
             patch_link = f"\nPatch is {human_readable_size(len(patch))}, truncated to {human_readable_size(DIFF_LIMIT)} below, full version: {self.pr.diff_url}\n"
             diff_stats = diff_stats[0:DIFF_LIMIT] + "...\n<truncated>\n"
         diff_stats += "</pre>"
+        team_mention = "@llvm/{}".format(team.slug)
 
         body = self.pr.body
         comment = (
----------------
cor3ntin wrote:

Something like this is probably more easily maintained 

```suggestion
        comment = f"""
            {self.COMMENT_TAG}
            {team_mention}
            
            <details>
              <summary>Changes</summary>
              {body}
              --
              {patch_link}
              {diff_stats}
            </details>
        """
```

https://github.com/llvm/llvm-project/pull/66037


More information about the llvm-commits mailing list