From eca39b5fc1872b76347c827254c6309902b88b05 Mon Sep 17 00:00:00 2001 From: motatoes Date: Wed, 5 Jun 2024 14:37:21 +0100 Subject: [PATCH] fix/-nobackend-options --- ee/backend/templates/github_success.tmpl | 18 ++++++++++++++++++ ee/cli/cmd/digger/root.go | 4 +--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 ee/backend/templates/github_success.tmpl diff --git a/ee/backend/templates/github_success.tmpl b/ee/backend/templates/github_success.tmpl new file mode 100644 index 000000000..b785aa6a4 --- /dev/null +++ b/ee/backend/templates/github_success.tmpl @@ -0,0 +1,18 @@ + + + + + Digger github app installed + + + + + +
+
+

App installation successful

+

You can now close this tab.

+
+
+ + \ No newline at end of file diff --git a/ee/cli/cmd/digger/root.go b/ee/cli/cmd/digger/root.go index b808aae22..41cfb3ad8 100644 --- a/ee/cli/cmd/digger/root.go +++ b/ee/cli/cmd/digger/root.go @@ -90,7 +90,7 @@ func PreRun(cmd *cobra.Command, args []string) { log.Println("WARNING: running in 'backendless' mode. Features that require backend will not be available.") PolicyChecker = policy.NoOpPolicyChecker{} BackendApi = backend.NoopApi{} - } else if os.Getenv("DIGGER_TOKEN") != "" { + } else { if os.Getenv("DIGGER_ORGANISATION") == "" { log.Fatalf("Token specified but missing organisation: DIGGER_ORGANISATION. Please set this value in action digger_config.") } @@ -104,8 +104,6 @@ func PreRun(cmd *cobra.Command, args []string) { AuthToken: os.Getenv("DIGGER_TOKEN"), HttpClient: http.DefaultClient, } - } else { - reportErrorAndExit("", "DIGGER_TOKEN not specified. You can get one at https://cloud.digger.dev, or self-manage a backend of Digger Community Edition (change DIGGER_HOSTNAME). You can also pass 'no-backend: true' option; in this case some of the features may not be available.", 1) } if os.Getenv("REPORTING_STRATEGY") == "comments_per_run" || os.Getenv("ACCUMULATE_PLANS") == "true" {