From 76591e0ea334c5a62012685da8bcb3c02981c54d Mon Sep 17 00:00:00 2001 From: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:05:18 +0545 Subject: [PATCH] notify chat on nightly success also (#8852) --- .drone.star | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.drone.star b/.drone.star index 8d1d8da48..67d56bff6 100644 --- a/.drone.star +++ b/.drone.star @@ -280,7 +280,7 @@ def main(ctx): # always append notification step pipelines.append( pipelineDependsOn( - notify(), + notify(ctx), pipelines, ), ) @@ -1908,7 +1908,11 @@ def makeGoGenerate(module): }, ] -def notify(): +def notify(ctx): + status = ["failure"] + if ctx.build.event == "cron": + status.append("success") + return { "kind": "pipeline", "type": "docker", @@ -1935,9 +1939,7 @@ def notify(): "refs/heads/release*", "refs/tags/**", ], - "status": [ - "failure", - ], + "status": status, }, }