Skip to content

CLI-1554 Share Server integration discovery for GitHub onboarding - #1296

Merged
zglicz merged 3 commits into
codex/CLI-1230-github-onboardingfrom
codex/CLI-1554-github-bindings
Nov 26, 2026
Merged

zglicz merged 3 commits into
codex/CLI-1230-github-onboardingfrom
codex/CLI-1554-github-bindings

Conversation

@zglicz

@zglicz zglicz commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Lets GitHub CI onboarding select an existing GitHub.com integration and use its repository-to-project bindings (CLI-1554).

  • Share DevOps integration discovery and types between sonar import and onboarding.
  • Use one GitHub/GitLab resolver for selection by --binding-name, with a separate GitHub.com URL check. Multiple integrations require an explicit selection.

Covered by tests for configuration selection and isolated bindings against the fake Server, plus resolver/client unit tests.

Stacked on #1295.

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

CLI-1554

@netlify

netlify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for sonarqube-cli ready!

Name Link
🔨 Latest commit 20ed8f4
🔍 Latest deploy log https://app.netlify.com/projects/sonarqube-cli/deploys/6b06f85bc2b1a6b2c1fe368c
😎 Deploy Preview https://deploy-preview-1296--sonarqube-cli.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@zglicz
zglicz marked this pull request as ready for review November 19, 2026 09:19
@zglicz
zglicz requested review from a team as code owners November 19, 2026 09:19
@zglicz
zglicz requested review from a team and kirill-knize-sonarsource November 19, 2026 09:19
@zglicz
zglicz force-pushed the codex/CLI-1554-github-bindings branch from 8db0e71 to 66b84ca Compare November 19, 2026 14:53
@nquinquenel
nquinquenel requested review from tsiaraskon-sonar and removed request for kirill-knize-sonarsource November 23, 2026 13:56
@zglicz
zglicz requested review from sophio-japharidze-sonarsource and removed request for tsiaraskon-sonar November 24, 2026 09:34

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One small refactoring suggestion. Otherwise LGTM 🚀

@zglicz
zglicz requested a review from a team as a code owner November 24, 2026 13:37
@zglicz
zglicz force-pushed the codex/CLI-1554-github-bindings branch from 0da9666 to 20ed8f4 Compare November 25, 2026 15:01
@gitar-bot

gitar-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findings

Sharing DevOps integration discovery and selecting repository bindings changes onboarding behavior; incorrect selection could associate repositories with unintended SonarQube projects.

Consolidates GitHub and GitLab DevOps integration resolution into a shared resolveDopSetting in src/commands/admin/onboard-ci/dop-setting.ts, with the GitHub.com check moved into a separate assertGithubComUrl. One open suggestion: the GitHub.com restriction is no longer enforced by the resolver, so a GitHub Enterprise setting can be returned when it is the only one configured, and the ambiguity error lists Enterprise integrations as valid --binding-name choices. Either add a resolveGithubDopSetting wrapper that runs the check or update the PR description to match the new design.

✅ 1 closed
Closed: Quality: GitHub.com restriction no longer enforced by the resolver

📄 src/commands/admin/onboard-ci/dop-setting.ts:24-38
The PR description says it keeps separate GitHub and GitLab resolvers, with only the selection logic shared. This commit merges them into one resolveDopSetting(bindings, platform, …) and moves the GitHub.com check into a separate assertGithubComUrl. That function has no production caller yet; only the tests use it. As a result, resolveDopSetting(bindings, 'github') returns a GitHub Enterprise setting whenever that is the only one configured. Every GitHub caller now has to remember to call assertGithubComUrl(setting.url) itself. If one forgets, onboarding would quietly use an unsupported Enterprise API URL. The ambiguity error also lists Enterprise integrations as valid --binding-name choices, and those choices would then be rejected. Either keep a resolveGithubDopSetting wrapper that runs the GitHub.com check, or update the PR description to match the new design.

Verification Rules 2/3 met PRs 4 inspected
Rules 1 failed 2 passed 2 not applicable

❌ Repository license compliance - No LICENSE/LICENCE/COPYING file or approved .github/sonarsource.yml license config was found in the workspace, so compliance cannot be verified; add the appropriate license file (do not choose legal text automatically).
✅ Internal artifact registries
✅ Release secrets usage

Functional validation No results

Broader impact PRs 4 inspected
Cross-PR 4 PRs inspected 0 open impacts

PR 1318: CLI-1557 Add bulk GitHub CI onboarding command Inspected
PR 1311: CLI-1556 Assess GitHub repositories and create onboarding PRs Inspected
PR 1310: CLI-1555 Generate GitHub onboarding workflows and PR content Inspected
PR 1333: CLI-1575 Track CI onboarding PR and MR creations Inspected

Auto-approval Withheld

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@datadog-sonarsource

This comment has been minimized.

@sonarqubecloud

Copy link
Copy Markdown

@zglicz
zglicz merged commit 8ee404e into master Nov 26, 2026
39 of 40 checks passed
@zglicz
zglicz deleted the codex/CLI-1554-github-bindings branch November 26, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants