From 244ce979201305b49368cb438d51a9960c68ffb1 Mon Sep 17 00:00:00 2001 From: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:12:36 +0545 Subject: [PATCH] notify chat on nightly success also (#8832) --- .drone.star | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.drone.star b/.drone.star index e20d51ef05..094a0fa877 100644 --- a/.drone.star +++ b/.drone.star @@ -289,7 +289,7 @@ def main(ctx): # always append notification step pipelines.append( pipelineDependsOn( - notify(), + notify(ctx), pipelines, ), ) @@ -1956,7 +1956,11 @@ def makeGoGenerate(module): }, ] -def notify(): +def notify(ctx): + status = ["failure"] + if ctx.build.event == "cron": + status.append("success") + return { "kind": "pipeline", "type": "docker", @@ -1983,9 +1987,7 @@ def notify(): "refs/heads/release*", "refs/tags/**", ], - "status": [ - "failure", - ], + "status": status, }, }