Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ func runAzureCleanup() error {
}
}

fmt.Printf("\nDeployment found:\n")
fmt.Printf("\n📋 Deployment found:\n")
fmt.Printf(" Deployed: %s\n", state.DeployedAt)
fmt.Printf(" Resource Group: %s\n", state.ResourceGroup)
fmt.Printf(" Region: %s\n", state.Region)

fmt.Printf("\nResources to delete:\n")
fmt.Printf("\n🗑️ Resources to delete:\n")
if acrName, ok := state.Resources.ACR.(string); ok && acrName != "" {
fmt.Printf(" Container Registry: %s\n", acrName)
}
Expand All @@ -161,7 +161,7 @@ func runAzureCleanup() error {
fmt.Printf(" Container: %s\n", c)
}

fmt.Printf("\nEndpoints that will be removed:\n")
fmt.Printf("\n🌐 Endpoints that will be removed:\n")
fmt.Printf(" Backend: %s\n", state.Endpoints.Backend)
fmt.Printf(" Config UI: %s\n", state.Endpoints.ConfigUI)
fmt.Printf(" Grafana: %s\n", state.Endpoints.Grafana)
Expand Down
4 changes: 2 additions & 2 deletions cmd/configure_connection_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ func runAddConnection(cmd *cobra.Command, args []string) error {
}

// ── Summary ──
fmt.Println("\n" + strings.Repeat("─", 50))
fmt.Println("\n" + strings.Repeat("─", 40))
fmt.Printf("✅ %s connection configured!\n", def.DisplayName)
fmt.Printf(" ID=%d %q\n", result.ConnectionID, result.Name)
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))

// ── Next step hint ──
hintOrg := org
Expand Down
4 changes: 2 additions & 2 deletions cmd/configure_connection_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ func runDeleteConnection(cmd *cobra.Command, args []string) error {
fmt.Printf("\n💾 State saved to %s\n", statePath)
}

fmt.Println("\n" + strings.Repeat("─", 50))
fmt.Println("\n" + strings.Repeat("─", 40))
fmt.Printf("✅ Connection deleted (plugin: %s, ID=%d)\n", plugin, connID)
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))
fmt.Println()

return nil
Expand Down
4 changes: 2 additions & 2 deletions cmd/configure_connection_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ func runUpdateConnection(cmd *cobra.Command, args []string) error {
}

// ── Summary ──
fmt.Println("\n" + strings.Repeat("─", 50))
fmt.Println("\n" + strings.Repeat("─", 40))
fmt.Printf("✅ Connection updated (ID=%d) %q\n", updated.ID, updated.Name)
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))
fmt.Println()

return nil
Expand Down
10 changes: 6 additions & 4 deletions cmd/configure_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,14 @@ func runConnectionsInternal(defs []*ConnectionDef, org, enterprise, tokenVal, en
}

if len(results) == 0 {
fmt.Println("\n" + strings.Repeat("─", 50))
fmt.Println("\n" + strings.Repeat("─", 40))
fmt.Println("⚠️ No connections were created.")
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the len(results) == 0 branch, the summary separator block ends and the function returns an error immediately. Per Terminal Output Standards (blank line after separators), this will cause the subsequent error message printed by Execute() to appear directly under the separator with no breathing room. Add an extra blank line after the closing separator (or ensure the next output starts with a blank line) before returning.

Suggested change
fmt.Println(strings.Repeat("─", 40))
fmt.Println(strings.Repeat("─", 40))
fmt.Println()

Copilot uses AI. Check for mistakes.
fmt.Println()
return results, client, statePath, state, fmt.Errorf("no connections were created")
}

fmt.Println("\n" + strings.Repeat("─", 50))
fmt.Println("\n" + strings.Repeat("─", 40))
fmt.Println("✅ Connections configured successfully!")
for _, r := range results {
name := r.Plugin
Expand All @@ -183,7 +184,8 @@ func runConnectionsInternal(defs []*ConnectionDef, org, enterprise, tokenVal, en
}
fmt.Printf(" %-18s ID=%d %q\n", name, r.ConnectionID, r.Name)
}
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The success summary returns immediately after printing the closing separator, so there’s no trailing blank line. Terminal output standards require a blank line after separators; add a final empty line after the closing separator here as well (matching the len(results)==0 branch).

Suggested change
fmt.Println(strings.Repeat("─", 40))
fmt.Println(strings.Repeat("─", 40))
fmt.Println()

Copilot uses AI. Check for mistakes.
fmt.Println()

return results, client, statePath, state, nil
}
4 changes: 2 additions & 2 deletions cmd/configure_project_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ func runProjectDelete(cmd *cobra.Command, args []string, projectDeleteName strin
}
fmt.Println(" ✅ Project deleted")

fmt.Println("\n" + strings.Repeat("─", 50))
fmt.Println("\n" + strings.Repeat("─", 40))
fmt.Printf("✅ Project %q deleted\n", name)
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))
fmt.Println()

return nil
Expand Down
5 changes: 3 additions & 2 deletions cmd/configure_projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func finalizeProject(opts finalizeProjectOpts) error {
fmt.Printf("\n\U0001f4be State saved to %s\n", opts.StatePath)
}

fmt.Println("\n" + strings.Repeat("\u2500", 50))
fmt.Println("\n" + strings.Repeat("\u2500", 40))
fmt.Println("\u2705 Project configured successfully!")
fmt.Printf(" Project: %s\n", opts.ProjectName)
if len(opts.Repos) > 0 {
Expand All @@ -353,7 +353,8 @@ func finalizeProject(opts finalizeProjectOpts) error {
for _, pn := range opts.PluginNames {
fmt.Printf(" Plugin: %s\n", pn)
}
fmt.Println(strings.Repeat("\u2500", 50))
fmt.Println(strings.Repeat("\u2500", 40))
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This summary block ends with a closing separator and then returns without printing a trailing blank line. Terminal Output Standards recommend a blank line after separators so the shell prompt (or subsequent output) doesn’t jam against the separator. Consider printing a final blank line after the closing separator here.

Suggested change
fmt.Println(strings.Repeat("\u2500", 40))
fmt.Println(strings.Repeat("\u2500", 40))
fmt.Println()

Copilot uses AI. Check for mistakes.
fmt.Println()

return nil
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/configure_scope_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ func runScopeAdd(cmd *cobra.Command, args []string, opts *ScopeOpts) error {
return err
}

fmt.Println("\n" + strings.Repeat("\u2500", 50))
fmt.Println("\n" + strings.Repeat("\u2500", 40))
fmt.Printf("\u2705 %s scopes configured successfully!\n", pluginDisplayName(selectedPlugin))
fmt.Printf(" Connection %d: scopes added\n", connID)
fmt.Println(strings.Repeat("\u2500", 50))
fmt.Println(strings.Repeat("\u2500", 40))
fmt.Println("\nNext step:")
fmt.Println(" Run 'gh devlake configure project add' to create a project and start data collection.")

Expand Down
4 changes: 2 additions & 2 deletions cmd/configure_scope_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ func runScopeDelete(cmd *cobra.Command, args []string) error {
}
fmt.Println(" \u2705 Scope deleted")

fmt.Println("\n" + strings.Repeat("\u2500", 50))
fmt.Println("\n" + strings.Repeat("\u2500", 40))
fmt.Printf("\u2705 Scope deleted (plugin: %s, connection ID=%d, scope ID=%s)\n", selectedPlugin, selectedConnID, selectedScopeID)
fmt.Println(strings.Repeat("\u2500", 50))
fmt.Println(strings.Repeat("\u2500", 40))
fmt.Println()

return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/deploy_azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func runDeployAzure(cmd *cobra.Command, args []string) error {
printBanner("DevLake Azure Deployment")
}

fmt.Printf("\nConfiguration:\n")
fmt.Printf("\n📋 Configuration:\n")
fmt.Printf(" Resource Group: %s\n", azureRG)
fmt.Printf(" Location: %s\n", azureLocation)
fmt.Printf(" Base Name: %s\n", azureBaseName)
Expand Down
2 changes: 1 addition & 1 deletion cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func runStatus(cmd *cobra.Command, args []string) error {
}

printBanner("DevLake Status")
sep := " " + strings.Repeat("─", 42)
sep := " " + strings.Repeat("─", 38)

if state == nil {
disc, err := devlake.Discover(cfgURL)
Expand Down