[bin] Update cocktail of webcam scripts
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user