diff --git a/scripts/gh_scripts/issue_comment_bot.py b/scripts/gh_scripts/issue_comment_bot.py index d5651c5ee97..edf1dd61307 100755 --- a/scripts/gh_scripts/issue_comment_bot.py +++ b/scripts/gh_scripts/issue_comment_bot.py @@ -217,7 +217,12 @@ def comment_on_thread(message: str): if lead['leadLabel'] == i['lead_label'] ) slack_id = next( - lead['slackId'] for lead in leads if lead['leadLabel'] == username + ( + lead['slackId'] # type: ignore[syntax] + for lead in leads + if lead['leadLabel'] == f'Lead: @{username}' + ), + '', ) if slack_id: message += f'Lead: {slack_id}\n'