Skip to content

Conversation

@deepin-mozart
Copy link
Contributor

@deepin-mozart deepin-mozart commented Jul 17, 2025

Log:
Change-Id: Ib57cc7df13749ccf670758b540172478afbb288e

Summary by Sourcery

Remove internal addresses by replacing hardcoded URLs with user-input placeholders

Enhancements:

  • Replace hardcoded package download URL with a placeholder in GenerateDialog
  • Replace hardcoded mirror URL with a placeholder in the container-up script

Log:
Change-Id: Ib57cc7df13749ccf670758b540172478afbb288e
@sourcery-ai
Copy link

sourcery-ai bot commented Jul 17, 2025

Reviewer's Guide

Replaces hard-coded internal repository URLs in both the C++ UI generator and the shell startup script with user-input placeholders to improve configurability.

Class diagram for GenerateDialog after removing hardcoded address

classDiagram
    class GenerateDialog {
        +void generate()
    }
Loading

Flow diagram for configurable repository URL in container-up.sh

flowchart TD
    A[Start container-up.sh] --> B[Set MIRROR to user input placeholder]
    B --> C[Continue with network namespace and bridge setup]
    C --> D[Container startup proceeds]
Loading

File-Level Changes

Change Details Files
Introduced URL placeholders for external resources
  • Replaced fixed depend["url"] value with ‘input your url’ placeholder
  • Replaced MIRROR variable value with ‘input your mirror address’ placeholder
src/plugins/linglong/gui/generatedialog.cpp
src/scripts/container-up.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepin-mozart

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

The pull request process is described 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

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • generatedialog.cpp文件中,依赖项的URL被硬编码为占位符"input your url",应该替换为实际的URL。
  • container-up.sh脚本中,镜像地址被硬编码为占位符"input your mirror address",应该替换为实际的镜像地址。

是否建议立即修改:

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @deepin-mozart - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `src/scripts/container-up.sh:20` </location>
<code_context>
 BR_IP="172.16.0.1/16"
 BR_GW="172.16.0.1"
-MIRROR="https://pools.uniontech.com/deepin"
+MIRROR="input your mirror address"

 sudo ip netns add ${NETNS_ID}
</code_context>

<issue_to_address>
Using 'input your mirror address' as a default may break script functionality.

Add a validation check for MIRROR or provide clear instructions to update this variable before running the script.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

BR_IP="172.16.0.1/16"
BR_GW="172.16.0.1"
MIRROR="https://pools.uniontech.com/deepin"
MIRROR="input your mirror address"
Copy link

Choose a reason for hiding this comment

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

issue (bug_risk): Using 'input your mirror address' as a default may break script functionality.

Add a validation check for MIRROR or provide clear instructions to update this variable before running the script.

@github-actions
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/plugins/linglong/gui/generatedialog.cpp": [
        {
            "line": "    source[\"url\"] = \"https://github.com/linuxdeepin/linglong-builder-demo.git\";",
            "line_number": 181,
            "rule": "S35",
            "reason": "Url link | 8521449550"
        }
    ]
}

@deepin-ci-robot deepin-ci-robot merged commit 9c43c39 into linuxdeepin:master Jul 17, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants