Conversation
…pilot/--skip-github Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
|
@copilot Doesn'yt look like the changes were commited/pushed to the branch. Can you try again? |
The changes are already committed and pushed — commit |
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Pushed a new commit ( |
1 similar comment
Pushed a new commit ( |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (3)
cmd/configure_full.go:55
- The configure_full.go command is missing the --skip-github flag registration. For consistency with configure_scopes.go (lines 69, 73) and backward compatibility during the deprecation period, this command should also register the scopeSkipGitHub flag with deprecated help text and mark it as hidden, similar to how --skip-copilot is handled at lines 54-55.
configureFullCmd.Flags().BoolVar(&scopeSkipCopilot, "skip-copilot", false, "Deprecated: use --plugin github instead")
_ = configureFullCmd.Flags().MarkHidden("skip-copilot")
cmd/configure_projects.go:136
- When scopePlugin is set but produces zero connections after filtering, the error message "no connections found — run 'gh devlake configure connection' first" is misleading if the plugin name is invalid. Consider adding validation to check if the plugin is valid before filtering, similar to the approach in configure_full.go lines 75-77.
if len(choices) == 0 {
return fmt.Errorf("no connections found — run 'gh devlake configure connection' first")
}
cmd/configure_full.go:83
- Missing blank line before interactive prompt. According to terminal output rule 6 in .github/instructions/terminal-output.instructions.md, when a prompt follows output, add a blank line so the prompt doesn't jam against the previous text. Add fmt.Println() before line 83 to separate the banner (lines 60-62) from the prompt.
selectedLabels := prompt.SelectMultiWithDefaults("Which connections to configure?", labels, []int{1, 2})
| cmd.Flags().BoolVar(&scopeSkipCopilot, "skip-copilot", false, "Deprecated: use --plugin github instead") | ||
| cmd.Flags().BoolVar(&scopeWait, "wait", true, "Wait for pipeline to complete") | ||
| cmd.Flags().DurationVar(&scopeTimeout, "timeout", 5*time.Minute, "Max time to wait for pipeline") | ||
| _ = cmd.Flags().MarkHidden("skip-copilot") |
There was a problem hiding this comment.
The configure_projects.go command is missing the --skip-github flag that is present in configure_scopes.go. For consistency and to maintain backward compatibility during the deprecation period, this command should also include the scopeSkipGitHub flag with the same setup as configure_scopes.go lines 69 and 73 (deprecated help text and MarkHidden).
| cmd.Flags().BoolVar(&scopeSkipCopilot, "skip-copilot", false, "Deprecated: use --plugin github instead") | |
| cmd.Flags().BoolVar(&scopeWait, "wait", true, "Wait for pipeline to complete") | |
| cmd.Flags().DurationVar(&scopeTimeout, "timeout", 5*time.Minute, "Max time to wait for pipeline") | |
| _ = cmd.Flags().MarkHidden("skip-copilot") | |
| cmd.Flags().BoolVar(&scopeSkipCopilot, "skip-copilot", false, "Deprecated: use --plugin github instead") | |
| cmd.Flags().BoolVar(&scopeSkipGitHub, "skip-github", false, "Deprecated: use --plugin gh-copilot instead") | |
| cmd.Flags().BoolVar(&scopeWait, "wait", true, "Wait for pipeline to complete") | |
| cmd.Flags().DurationVar(&scopeTimeout, "timeout", 5*time.Minute, "Max time to wait for pipeline") | |
| _ = cmd.Flags().MarkHidden("skip-copilot") | |
| _ = cmd.Flags().MarkHidden("skip-github") |
There was a problem hiding this comment.
Added --skip-github as a deprecated hidden flag to configure_projects.go in commit 5a268c6.
|
@copilot Please fix the following issues in this PR: 1. README.md not updated 2. Missing 3. Misleading error in configure_projects.go when 4. Missing blank line before interactive prompt in configure_full.go |
1 similar comment
|
@copilot Please fix the following issues in this PR: 1. README.md not updated 2. Missing 3. Misleading error in configure_projects.go when 4. Missing blank line before interactive prompt in configure_full.go |
…README Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Fixed in commit
|
All four items were already addressed in commit
|
Replaces the negative
--skip-copilot/--skip-githubflags with a positive--pluginselector acrossconfigure scope,configure project, andconfigure full. This scales cleanly to N plugins without adding per-plugin skip flags.Behavior
Flag mode —
--pluginis required when any data flag is provided; omitting it errors clearly:Interactive mode — no flags → prompts "Which plugin to configure?" before proceeding (with a blank line before the prompt per terminal UX rules).
configure full --plugin <slug>— skips the multi-select picker and limits the run to one plugin.Changes
configure_scopes.go: AddedscopePluginvar and--pluginflag. Resolution logic at top ofrunConfigureScopesmaps--plugin→ internal skip-flags, enforces flag-mode error, and falls back to an interactive prompt.configure_projects.go: Added--pluginflag; validates plugin name before filtering, then filtersdiscoverConnections()output to the specified plugin viafilterChoicesByPlugin()helper. Added--skip-githubas a deprecated hidden flag for consistency.configure_full.go: Added--pluginflag; bypassesSelectMultiWithDefaultsprompt when plugin is explicitly set. Added--skip-githubas a deprecated hidden flag. Added blank line before interactive prompt per terminal output rules.README.md: Updated flag tables forconfigure scopeandconfigure fullto document--plugin; added deprecation note for--skip-copilot/--skip-github.--skip-copilotand--skip-githubmarked hidden on all three commands. Both still function for one release.TestRunConfigureScopes_PluginFlagcovers unknown-plugin error, flag-mode error, and skip-flag derivation.TestFilterChoicesByPlugincovers the helper including empty-plugin and unknown-plugin edge cases.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.