Skip to content

Commit

Permalink
Fix broken Slack digest for new comments (#9455)
Browse files Browse the repository at this point in the history
* Correctly compare GitHub username to lead label
* Parenthesize generator expression
* Set `next` default to empty string
* Actually paranthesize generator expression

---------

Co-authored-by: jchamp <jchamp@archive.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mek <michael.karpeles@gmail.com>
Co-authored-by: Scott Barnes <scottreidbarnes@gmail.com>
  • Loading branch information
5 people committed Jun 26, 2024
1 parent c546c6a commit 3a59fc5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/gh_scripts/issue_comment_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 3a59fc5

Please sign in to comment.