[bin] Update cocktail of webcam scripts

This commit is contained in:
2025-08-29 11:07:41 -04:00
parent cc67abd1ce
commit c80a0894bc
4 changed files with 170 additions and 35 deletions

View File

@ -30,6 +30,7 @@ SLACK_SENDER = "notification@slack.com"
GITHUB_SENDER = "notifications@github.com"
JIRA_BASE_URL = os.getenv("JIRA_BASE_URL", "https://yourcompany.atlassian.net/browse")
GH_STATE_AND_TITLE_TO_SKIP = ["New Relic Exporter", "cancelled", "skipped", "succeeded"]
# ----------------------
# HELPERS
# ----------------------
@ -179,8 +180,14 @@ def check_notifications():
continue
message = format_message(source, subject, body, link)
print(f"Sending {source} notification: {subject}")
send_ntfy_notification(subject, message)
send_notice = True
for exclusion in GH_STATE_AND_TITLE_TO_SKIP:
if exclusion in subject:
print(f"Skipping notification: {subject}")
send_notice = False
if send_notice:
print(f"Sending {source} notification: {subject}")
send_ntfy_notification(subject, message)
archive_message(mail, num)
mail.expunge()