Skip to content

CLI-1556 Assess GitHub repositories and create onboarding PRs - #1311

Merged
zglicz merged 8 commits into
codex/CLI-1555-github-workflowsfrom
codex/CLI-1556-github-lifecycle
Nov 26, 2026
Merged

zglicz merged 8 commits into
codex/CLI-1555-github-workflowsfrom
codex/CLI-1556-github-lifecycle

Conversation

@zglicz

@zglicz zglicz commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds assessment and onboarding PR creation for a single GitHub repository (CLI-1556).

  • Skip unbound, analyzed, already configured or unsupported repositories, and match repository bindings case-insensitively.
  • Share existing-analysis detection and the pre-delete open-request guard with GitLab.
  • Render and validate the workflow before writes, then create or recreate the onboarding branch from the current default branch.
  • Check remote state after uncertain writes to recover without duplicate PRs.

Covered by fake GitHub/Server and GitLab integration tests, including mixed-case bindings, Gradle tasks and options, and PRs/MRs appearing after assessment.

Stacked on #1310. The bulk command follows in #1318.

@zglicz
zglicz added this pull request to stack #1297 November 18, 2026 15:11
@hashicorp-vault-sonar-prod

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

Copy link
Copy Markdown
Contributor

CLI-1556

@zglicz zglicz closed this Nov 18, 2026
@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for sonarqube-cli ready!

Name Link
🔨 Latest commit f9119c4
🔍 Latest deploy log https://app.netlify.com/projects/sonarqube-cli/deploys/6afdc01ad5c5cac8eccc1c46
😎 Deploy Preview https://deploy-preview-1311--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.

@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for sonarqube-cli canceled.

Name Link
🔨 Latest commit 74e825b
🔍 Latest deploy log https://app.netlify.com/projects/sonarqube-cli/deploys/6b071765499357c1b1ed6809

@zglicz zglicz reopened this Nov 18, 2026
@zglicz
zglicz force-pushed the codex/CLI-1556-github-lifecycle branch from 12fc4f9 to c3a1517 Compare November 18, 2026 15:44
@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 nquinquenel November 19, 2026 09:19
@zglicz
zglicz force-pushed the codex/CLI-1556-github-lifecycle branch 2 times, most recently from 948a364 to ce689b2 Compare November 23, 2026 10:13
@zglicz
zglicz requested a review from a team as a code owner November 23, 2026 10:13
@datadog-sonarsource

This comment has been minimized.

@nquinquenel
nquinquenel requested review from tsiaraskon-sonar and removed request for nquinquenel November 23, 2026 13:56
@zglicz
zglicz requested review from sophio-japharidze-sonarsource and removed request for tsiaraskon-sonar November 24, 2026 09:45
@zglicz
zglicz force-pushed the codex/CLI-1556-github-lifecycle branch 2 times, most recently from 35d9a62 to 71b5476 Compare November 24, 2026 14:13
Normalize repository binding keys without changing project keys. Share existing-analysis detection and the pre-delete open-request guard across GitHub and GitLab, with integration regressions for Gradle and reruns.
@zglicz
zglicz force-pushed the codex/CLI-1556-github-lifecycle branch from 2dd3c75 to 5c9ce00 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

GitHub onboarding creates or replaces a branch, commits a workflow, and opens PRs; mistaken eligibility could propose unwanted CI changes.

Adds assessment and onboarding PR creation for a single GitHub repository, skipping unbound, analyzed, already configured, or unsupported repos and validating the workflow before writes. One resolved finding: the template-rendering test now registers a project so it reaches the render step. No open issues found.

✅ 1 closed
✅ Quality: Template-rendering test fails at project lookup, never reaches render

📄 tests/integration/specs/admin/onboard-ci-github-processor.test.ts:211 📄 tests/integration/specs/admin/onboard-ci-github-processor.test.ts:214 📄 src/commands/admin/onboard-ci/github/processor.ts:83
The test renders a complete template and reports invalid rendering before any writes binds the repo to 'bad key'. The fake Server only registers sample-project, so /api/components/show returns 404 for 'bad key'. assessRepo then throws at componentExists (processor.ts:80-84) with "Bound SonarQube project ... is missing". That happens before validateWorkflowOptions/renderWorkflowTemplate run, and the test only checks outcome: 'failed'. So it would still pass if renderWorkflowTemplate stopped rejecting unsafe project keys, and the template-rejection path it claims to cover is never run. To fix, register the unsafe key on the fake server (or stub componentExists/hasProjectBeenAnalyzed) and assert on the rendering error message, e.g. error: expect.stringContaining('unsafe').

Verification Rules 3/3 met

Functional validation No results

Rules 3 passed 2 not applicable

✅ Internal artifact registries
✅ Release secrets usage
✅ Repository license compliance

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

@sonarqubecloud

Copy link
Copy Markdown

@zglicz
zglicz merged commit 15d3d5f into master Nov 26, 2026
45 of 46 checks passed
@zglicz
zglicz deleted the codex/CLI-1556-github-lifecycle 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