Skip to content
Merged
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
18 changes: 12 additions & 6 deletions pkg/cmd/ci/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,16 +640,22 @@ func workflows(opts migrateOptions) error {

fmt.Fprintln(out, "")
fmt.Fprintf(out, "%s\n\n", bold.Render("Next steps:"))
if defaultBranch != "" {
fmt.Fprintf(out, " 1. Activate these workflows by pushing and merging them into %s\n", bold.Render(defaultBranch))
} else {
fmt.Fprintln(out, " 1. Activate these workflows by pushing and merging them into your default branch")
}

if len(detectedSecrets) > 0 || len(detectedVariables) > 0 {
fmt.Fprintf(out, " 2. Your workflows depend on %d secret(s) and %d variable(s) which need to be imported from GitHub:\n", len(detectedSecrets), len(detectedVariables))
fmt.Fprintf(out, " 1. Your workflows depend on %d secret(s) and %d variable(s) which need to be imported from GitHub:\n", len(detectedSecrets), len(detectedVariables))
fmt.Fprintln(out, " - Import them automatically with `depot ci migrate secrets-and-vars`")
fmt.Fprintln(out, " - Or import them manually with `depot ci secrets add` and `depot ci vars add`")
if defaultBranch != "" {
fmt.Fprintf(out, " 2. Activate these workflows by pushing and merging them into %s\n", bold.Render(defaultBranch))
} else {
fmt.Fprintln(out, " 2. Activate these workflows by pushing and merging them into your default branch")
}
} else {
if defaultBranch != "" {
fmt.Fprintf(out, " Activate these workflows by pushing and merging them into %s\n", bold.Render(defaultBranch))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing step number prefix. When no secrets or variables are detected, the instruction should be numbered as step 1 for consistency with the other code path.

fmt.Fprintf(out, "  1. Activate these workflows by pushing and merging them into %s\n", bold.Render(defaultBranch))
Suggested change
fmt.Fprintf(out, " Activate these workflows by pushing and merging them into %s\n", bold.Render(defaultBranch))
fmt.Fprintf(out, " 1. Activate these workflows by pushing and merging them into %s\n", bold.Render(defaultBranch))

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

disagree!

} else {
fmt.Fprintln(out, " Activate these workflows by pushing and merging them into your default branch")
}
}

fmt.Fprintln(out, "")
Expand Down
Loading