From 5d78017c36505326861040d5321bb7b593990a35 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Wed, 29 Jan 2025 09:00:57 -0500 Subject: [PATCH] feat(cmd/joj3): support skip teapot --- cmd/joj3/teapot/run.go | 4 ++++ internal/conf/model.go | 1 + 2 files changed, 5 insertions(+) diff --git a/cmd/joj3/teapot/run.go b/cmd/joj3/teapot/run.go index f4b79f6..568036c 100644 --- a/cmd/joj3/teapot/run.go +++ b/cmd/joj3/teapot/run.go @@ -21,6 +21,10 @@ type RunResult struct { func Run(conf *conf.Conf) ( runResult RunResult, err error, ) { + if conf.Teapot.Skip { + slog.Info("teapot skip") + return + } os.Setenv("LOG_FILE_PATH", conf.Teapot.LogPath) if env.Attr.Actor == "" || env.Attr.Repository == "" || diff --git a/internal/conf/model.go b/internal/conf/model.go index 5f09458..6add917 100644 --- a/internal/conf/model.go +++ b/internal/conf/model.go @@ -41,6 +41,7 @@ type Conf struct { PostStages []ConfStage } Teapot struct { + Skip bool `default:"false"` LogPath string `default:"/home/tt/.cache/joint-teapot-debug.log"` EnvFilePath string `default:"/home/tt/.config/teapot/teapot.env"` ScoreboardPath string `default:"scoreboard.csv"`