[llvm] [Github] Fix github automation script on empty descriptions (PR #71274)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 4 00:52:14 PDT 2023
boomanaiden154 wrote:
This addresses failures like the one present in https://github.com/llvm/llvm-project/actions/runs/6753398365/job/18360167668:
```
Traceback (most recent call last):
File "/home/runner/work/llvm-project/llvm-project/./github-automation.py", line 702, in <module>
pr_subscriber.run()
File "/home/runner/work/llvm-project/llvm-project/./github-automation.py", line 163, in run
body = escape_description(self.pr.body)
File "/home/runner/work/llvm-project/llvm-project/./github-automation.py", line 52, in escape_description
str = html.escape(str, False)
File "/usr/lib/python3.10/html/__init__.py", line 1[9](https://github.com/llvm/llvm-project/actions/runs/6753398365/job/18360167668#step:3:10), in escape
s = s.replace("&", "&") # Must be done first!
AttributeError: 'NoneType' object has no attribute 'replace'
```
Not sure if this is the most optimal way to handle it (might want to handle it outside of the `escape` function), but I'm happy to implement feedback from reviewers here.
https://github.com/llvm/llvm-project/pull/71274
More information about the llvm-commits
mailing list