def forStatus(cls, build): """Create a mailer for notifying about live filesystem build status. :param build: The relevant build. """ requester = build.requester recipients = {requester: RecipientReason.forBuildRequester(requester)} return cls("[LiveFS build #%(build_id)d] %(build_title)s", "livefsbuild-notification.txt", recipients, config.canonical.noreply_from_address, build)
def forManualReview(cls, build): """Create a mailer for notifying about manual review. :param build: The relevant build. """ requester = build.requester recipients = {requester: RecipientReason.forBuildRequester(requester)} return cls("%(snap_name)s held for manual review", "snapbuild-manualreview.txt", recipients, config.canonical.noreply_from_address, "snap-build-release-manual-review", build)
def forUploadScanFailure(cls, build): """Create a mailer for notifying about store upload scan failures. :param build: The relevant build. """ requester = build.requester recipients = {requester: RecipientReason.forBuildRequester(requester)} return cls("Store upload scan failed for %(snap_name)s", "snapbuild-scanfailed.txt", recipients, config.canonical.noreply_from_address, "snap-build-upload-scan-failed", build)
def forRefreshFailure(cls, build): """Create a mailer for notifying about macaroon refresh failures. :param build: The relevant build. """ requester = build.requester recipients = {requester: RecipientReason.forBuildRequester(requester)} return cls("Refreshing store authorization failed for %(snap_name)s", "snapbuild-refreshfailed.txt", recipients, config.canonical.noreply_from_address, "snap-build-upload-refresh-failed", build)
def forStatus(cls, build): """Create a mailer for notifying about build status. :param build: The build to notify about the state of. """ requester = build.requester recipients = {requester: RecipientReason.forBuildRequester(requester)} return cls( '[recipe build #%(build_id)d] of ~%(recipe_owner)s %(recipe)s in' ' %(distroseries)s: %(status)s', 'build-request.txt', recipients, config.canonical.noreply_from_address, build)