Skip to content

Commit

Permalink
hub: add footer to the e-mail notifications
Browse files Browse the repository at this point in the history
... generated by `osh-cli` tasks (non-errata scans).

Signed-off-by: Siteshwar Vashisht <svashisht@redhat.com>
  • Loading branch information
siteshwar committed Apr 29, 2024
1 parent 16d84f2 commit 62f7cab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion osh/hub/scan/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def send_task_notification(request, task_id):
]
message = "\n".join(message)

if settings.NOTIFICATION_EMAIL_FOOTER:
message += f"\n{settings.NOTIFICATION_EMAIL_FOOTER}"

subject = "Task [#%s] %s finished, state: %s" % (task_id, package, state)

to = task.args.get("email_to", []) or []
Expand Down Expand Up @@ -196,7 +199,9 @@ def generate_general_text(self, display_states=True):
Fix later -- defect is true positive, but fix is postponed to next release
Not a bug -- issue is false positive, so you are waiving it
"""
message += settings.NOTIFICATION_EMAIL_FOOTER

if settings.NOTIFICATION_EMAIL_FOOTER:
message += f"\n{settings.NOTIFICATION_EMAIL_FOOTER}"

return message

Expand Down

0 comments on commit 62f7cab

Please sign in to comment.