Conversation
…elp text Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Document plugin-specific flag applicability in help text
docs: group flags by plugin applicability in connection and scope add help text
Mar 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the CLI help text for gh devlake configure connection add and gh devlake configure scope add by grouping flags into shared vs plugin-specific sections, so users can tell which flags apply to GitHub vs GitHub Copilot without reading source.
Changes:
- Restructures
configure connection addLonghelp into shared vs Copilot-specific flags + examples. - Restructures
configure scope addLonghelp into shared vs GitHub vs Copilot flags + examples.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/configure_connection_add.go | Updates Long help text to group flags by applicability and add per-plugin examples. |
| cmd/configure_scope_add.go | Updates Long help text to group flags by applicability and add per-plugin examples. |
Comments suppressed due to low confidence (3)
cmd/configure_scope_add.go:27
- The help text says
--connection-idis “required in flag mode”, but the flag definition and implementation both treat it as optional (auto-detected if omitted viaresolveConnectionID, and it can prompt if multiple exist). Suggest rewording this line to reflect that--connection-idis optional/auto-detected, otherwise users may think they must always provide it.
Shared flags (all plugins):
--plugin Plugin to configure (required in flag mode)
--connection-id Connection ID (required in flag mode)
--org Organization slug
cmd/configure_connection_add.go:46
- The help text labels
--orgas “GitHub Copilot-specific”, but the flag is registered on this command for all plugins and is used even when the selected plugin doesn’t require it (e.g., it’s prompted/accepted and stored in state for downstream scope commands). Consider moving--orginto the shared section (with a note about plugin-specific semantics) to avoid misleading GitHub users (your GitHub example also uses--org).
This issue also appears on line 45 of the same file.
GitHub Copilot-specific flags:
--enterprise Enterprise slug
--org Organization slug (required unless enterprise provided)
cmd/configure_connection_add.go:55
- This help text states
--orgis “required unless enterprise provided” for Copilot, butrunAddConnectiondoesn’t currently enforce “org OR enterprise” forgh-copilot(it only enforcesdef.NeedsOrg, andgh-copilotusesNeedsOrgOrEnt). Either update the help text to match current behavior, or add validation/prompting so at least one of--org/--enterpriseis required for Copilot connections.
--enterprise Enterprise slug
--org Organization slug (required unless enterprise provided)
Token resolution order:
--token flag → .devlake.env → environment variable → masked prompt
Example (GitHub):
gh devlake configure connection add --plugin github --token ghp_xxx --org my-org
Example (Copilot):
gh devlake configure connection add --plugin gh-copilot --token ghp_xxx --org my-org --enterprise my-ent`,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users had no way to know which flags apply to which plugin without reading source code — all flags were listed flat with no plugin attribution.
Changes
cmd/configure_connection_add.go— replaced bare token resolution note with structured sections: Shared flags (all plugins), GitHub Copilot-specific flags (--enterprise,--org), and per-plugin usage examplescmd/configure_scope_add.go— replaced two-line example block with structured sections: Shared flags, GitHub-specific flags (repos, DORA config), GitHub Copilot-specific flags (--enterprise), and per-plugin examples with--connection-idNo behavioral changes — flag wiring is untouched.
Original prompt
This section details on the original issue you should resolve
<issue_title>Document plugin-specific flag applicability in help text</issue_title>
<issue_description>## Problem
Several flags on
configure connectionandconfigure scopeare plugin-specific, but this isn't documented anywhere in the CLI help text. Users don't know which flags apply to which plugin without trial and error or reading source code. This will get worse as more plugins are added (#13 GitLab, #14 Azure DevOps).Connection flags with plugin-specific applicability
--token--org--enterprise--endpoint--proxyScope flags with plugin-specific applicability
--repos--repos-file--deployment-pattern--production-pattern--incident-label--enterprise--orgCurrent help output (scope example)
All flags are mixed together with no indication of which apply to which plugin.
Dependencies
Blocked by:
configure connection add: Extract connection creation intoaddsubcommand #54 (connection add) —Longtext moves toaddsubcommand created thereconfigure scope add/list/delete: Add CRUD subcommands for scope management #55 (scope CRUD) —Longtext moves toaddsubcommand created thereBlocks:
Parallel with: #57 (ScopeFunc) — independent changes, no file overlap
Proposed solution (Option A: help text annotations)
Update the
Longdescription text onconfigure connection addandconfigure scope addto clearly document which flags apply to which plugin. This is a pure documentation improvement — no behavioral changes.Scope add — updated Long text
Connection add — updated Long text
Implementation
Longtext inconfigure connection add(or currentconfigureConnectionsCmduntilconfigure connection add: Extract connection creation intoaddsubcommand #54 ships)Longtext inconfigure scope add(or current scope command untilconfigure scope add/list/delete: Add CRUD subcommands for scope management #55 ships)Longtext to show typ...✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.