Skip to content

Commit 76a682d

Browse files
committed
[patch] handle edge case when additional channel is empty
1 parent f4d2817 commit 76a682d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.secrets.baseline

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2025-12-10T20:44:32Z",
6+
"generated_at": "2025-12-11T13:22:20Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -82,15 +82,15 @@
8282
"hashed_secret": "053f5ed451647be0bbb6f67b80d6726808cad97e",
8383
"is_secret": false,
8484
"is_verified": false,
85-
"line_number": 54,
85+
"line_number": 55,
8686
"type": "Secret Keyword",
8787
"verified_result": null
8888
},
8989
{
9090
"hashed_secret": "4f75456d6c1887d41ed176f7ad3e2cfff3fdfd91",
9191
"is_secret": false,
9292
"is_verified": false,
93-
"line_number": 63,
93+
"line_number": 64,
9494
"type": "Secret Keyword",
9595
"verified_result": null
9696
}

bin/mas-devops-notify-slack

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ def _broadcast(channels: str, message: list):
3535
responses = []
3636
for channel in channelList:
3737
try:
38-
response = SlackUtil.postMessageBlocks(channel, message)
39-
responses.append(response.data.get("ok", False))
38+
if channel:
39+
response = SlackUtil.postMessageBlocks(channel, message)
40+
responses.append(response.data.get("ok", False))
4041
except Exception as e:
4142
print(f"Failed to send message to channel {channel}: {e}")
4243
responses.append(False)

0 commit comments

Comments
 (0)