[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 11:25:26 PDT 2023


================
@@ -131,10 +139,23 @@ 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"
----------------
cor3ntin wrote:

I think i did not look that carefully enough.

we need to escape `patch`, not diff_stats

```diff
- diff_stats += "\n<pre>\n" + patch
+ diff_stats += "\n<pre>\n" + html.escape(patch)
```

But there are other rendering bugs I think, we should limit the number of change files, and the number of lines in the diff as 2 different things. I suppose we can fix that later 

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


More information about the llvm-commits mailing list