diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py index 52523704fe82d..ad1878d411939 100755 --- a/llvm/utils/git/github-automation.py +++ b/llvm/utils/git/github-automation.py @@ -48,6 +48,11 @@ def _get_curent_team(team_name, teams) -> Optional[github.Team.Team]: def escape_description(str): + # If the description of an issue/pull request is empty, the Github API + # library returns None instead of an empty string. Handle this here to + # avoid failures from trying to manipulate None. + if str is None: + return "" # https://github.com/github/markup/issues/1168#issuecomment-494946168 str = html.escape(str, False) # '@' followed by alphanum is a user name