-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional notification #39
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -400,7 +400,17 @@ _report_services() { | |
local TITLE BODY | ||
TITLE="[${STACK}] ${NUM_UPDATED} services updated ${NUM_FAILED} failed${ERROR_STRING}" | ||
BODY=$(echo -e "${UPDATED_MSG}\n${FAILED_MSG}\n${ERROR_MSG}") | ||
_send_notification "${TYPE}" "${TITLE}" "${BODY}" | ||
|
||
case "${GANTRY_NOTIFICATION_CONDITION:-all}" in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assign global variable to a local one like line 276. |
||
changed-only) | ||
if [ "${NUM_UPDATED}" -gt 0 ] || [ "${NUM_TOTAL_ERRORS}" -gt 0 ]; then | ||
_send_notification "${TYPE}" "${TITLE}" "${BODY}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 407 and 411 are same. They should be combined. like if (some condition) { |
||
fi | ||
;; | ||
all|*) | ||
_send_notification "${TYPE}" "${TITLE}" "${BODY}" | ||
;; | ||
esac | ||
} | ||
|
||
_in_list() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you list all valid values at beginning. like line 79.