Skip to content

refactor: unify repo command handling in cli and builder#1677

Merged
dengbo11 merged 1 commit into
OpenAtom-Linyaps:masterfrom
reddevillg:repo_cmd
Jun 18, 2026
Merged

refactor: unify repo command handling in cli and builder#1677
dengbo11 merged 1 commit into
OpenAtom-Linyaps:masterfrom
reddevillg:repo_cmd

Conversation

@reddevillg

Copy link
Copy Markdown
Collaborator

Consolidate duplicate repo subcommand logic from ll-cli and ll-builder into linglong::common::cli (with addRepoCommand, handleRepoCommand) using a RepoConfigBackend abstraction for config access and add unit tests.

Consolidate duplicate repo subcommand logic from ll-cli and ll-builder
into linglong::common::cli (with addRepoCommand, handleRepoCommand)
using a RepoConfigBackend abstraction for config access and add unit
tests.

Signed-off-by: reddevillg <reddevillg@gmail.com>
@deepin-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: reddevillg

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request refactors the repository management commands in ll-builder and ll-cli by extracting the common CLI subcommand definition and handling logic into a shared module under libs/linglong/src/linglong/common/cli/repo. It also adds corresponding unit tests to verify the shared functionality. Feedback on the changes suggests utilizing CLI11's built-in deprecated() method for the deprecated modify subcommand, improving URL validation to explicitly check for http:// or https:// prefixes, and replacing the magic number 100 used for priority boosting with a named constant.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread libs/linglong/src/linglong/common/cli/repo.cpp
Comment thread libs/linglong/src/linglong/common/cli/repo.cpp
Comment thread libs/linglong/src/linglong/common/cli/repo.cpp
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.80788% with 177 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
libs/linglong/src/linglong/common/cli/repo.cpp 17.33% 15 Missing and 109 partials ⚠️
libs/linglong/src/linglong/cli/cli.cpp 0.00% 29 Missing ⚠️
apps/ll-builder/src/main.cpp 0.00% 22 Missing ⚠️
apps/ll-cli/src/main.cpp 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
libs/linglong/src/linglong/cli/cli.h 8.33% <ø> (ø)
apps/ll-cli/src/main.cpp 0.00% <0.00%> (ø)
apps/ll-builder/src/main.cpp 0.00% <0.00%> (ø)
libs/linglong/src/linglong/cli/cli.cpp 1.83% <0.00%> (+0.08%) ⬆️
libs/linglong/src/linglong/common/cli/repo.cpp 17.33% <17.33%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dengbo11 dengbo11 merged commit 37bf121 into OpenAtom-Linyaps:master Jun 18, 2026
15 of 16 checks passed
@reddevillg reddevillg deleted the repo_cmd branch June 18, 2026 09:27
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.

3 participants