From c55c5d77ceb91c9fa0e15b760f10da9b13ff8cea Mon Sep 17 00:00:00 2001 From: whywaita Date: Tue, 14 May 2024 01:00:11 +0900 Subject: [PATCH] Logging depcated usage --- pkg/config/init.go | 5 +++++ pkg/runner/runner.go | 1 + 2 files changed, 6 insertions(+) diff --git a/pkg/config/init.go b/pkg/config/init.go index 3266b68..0b796dc 100644 --- a/pkg/config/init.go +++ b/pkg/config/init.go @@ -67,6 +67,11 @@ func LoadWithDefault() Conf { if mwt == ModeWebhookTypeUnknown { log.Panicf("%s is invalid webhook type", os.Getenv(EnvModeWebhookType)) } + + if mwt == ModeWebhookTypeCheckRun { + log.Println("WARNING: check_run is deprecated mode and will delete it. Please use workflow_job") + } + c.ModeWebhookType = mwt } diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go index 7638908..9aa403c 100644 --- a/pkg/runner/runner.go +++ b/pkg/runner/runner.go @@ -111,6 +111,7 @@ func GetRunnerTemporaryMode(runnerVersion string) (string, TemporaryMode, error) } if ephemeralSupportVersion.GreaterThan(inputVersion) { + logger.Logf(false, "WARNING: runner version is lower than v2.282.0, use --once mode. It's deprecated. will be removed in future.") return runnerVersion, TemporaryOnce, nil } return runnerVersion, TemporaryEphemeral, nil