Skip to content

Commit

Permalink
fix/-nobackend-options
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Jun 5, 2024
1 parent 98f2155 commit eca39b5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 18 additions & 0 deletions ee/backend/templates/github_success.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Digger github app installed</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
<section class="header">
<h1 class="title-heading">App installation successful</h1>
<p>You can now close this tab.</p>
</section>
</div>
</body>
</html>
4 changes: 1 addition & 3 deletions ee/cli/cmd/digger/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand All @@ -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" {
Expand Down

0 comments on commit eca39b5

Please sign in to comment.