Skip to content

Commit

Permalink
Merge pull request #204 from whywaita/refactor/logging-deprecated
Browse files Browse the repository at this point in the history
Logging deprecated usage
  • Loading branch information
whywaita authored May 13, 2024
2 parents aed29c8 + c55c5d7 commit cbe7eda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cbe7eda

Please sign in to comment.