Skip to content

Conversation

@willc001
Copy link
Contributor

@willc001 willc001 commented Oct 20, 2025

Closes PERMISSION-832

依赖检查

组件之间的依赖声明,是微服务组件架构下的重要信息,请确保其正确性。

请勾选以下两组选项其中之一:

  • 本次 MR 没有使用上游组件(例如框架、后台组件等)的较新版本提供的特性。

或者:

  • 本次 MR 使用了上游组件(例如框架、后台组件等)的较新版本提供的特性。
  • 在对应的文件中更新了该上游组件的依赖版本(或确认了当前声明的依赖版本已包含本次 MR 使用的新特性)。

提交信息检查

Git 提交信息将决定包的版本发布及自动生成的 CHANGELOG,请检查工作内容与提交信息是否相符,并在以下每组选项中都依次确认。

破坏性变更是针对于下游使用者而言,可以通过本次改动对下游使用者的影响来识别变更类型:

  • 下游使用者不做任何改动,仍可以正常工作时,那么它属于普通变更。
  • 反之,下游使用者不做改动就无法正常工作时,那么它属于破坏性变更。

例如,构件修改了一个属性名,小产品 Storyboard 中需要使用新属性名才能工作,那么它就是破坏性变更。
又例如,构件还没有任何下游使用者,那么它的任何变更都是普通变更。

破坏性变更:

  • ⚠️ 本次 MR 包含破坏性变更的提交,请继续确认以下所有选项:
  • 没有更好的兼容方案,必须做破坏性变更。
  • 使用了 feat 作为提交类型。
  • 标注了 BREAKING CHANGE: 你的变更说明
  • 同时更新了本仓库中所有下游使用者的调用。
  • 同时更新了本仓库中所有下游使用者对该子包的依赖为即将发布的 major 版本。
  • 同时为其它仓库的 Migrating 做好了准备,例如文档或批量改动的方法。
  • 手动验证过破坏性变更在 Migrate 后可以正常工作。
  • 破坏性变更所在的提交没有意外携带其它子包的改动。

新特性:

  • 本次 MR 包含新特性的提交,且该提交不带有破坏性变更,并使用了 feat 作为提交类型。
  • 给新特性添加了单元测试。
  • 手动验证过新特性可以正常工作。

问题修复:

  • 本次 MR 包含问题修复的提交,且该提交不带有新特性或破坏性变更,并使用了 fix 作为提交类型。
  • 给问题修复添加了单元测试。
  • 手动验证过问题修复得到解决。

杂项工作:

即所有对下游使用者无任何影响、且没有必要显示在 CHANGELOG 中的改动,例如修改注释、测试用例、开发文档等:

  • 本次 MR 包含杂项工作的提交,且该提交不带有问题修复、新特性或破坏性变更,并使用了 chore, docs, test 等作为提交类型。

Summary by CodeRabbit

Bug Fixes

  • 优化了应用黑名单机制,确保外部 URL 被正确排除,仅内部路径会被添加至黑名单。

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

概览

修改了路径黑名单机制,仅当路径真实且以"/"开头时才添加到黑名单,同时在测试中验证外部URL被排除。

变更

分组 / 文件 变更摘要
黑名单逻辑细化
packages/runtime/src/internal/Router.tspackages/runtime/src/internal/Runtime.spec.ts
Router.ts:收严黑名单路径添加条件,仅在路径真实且以"/"开头时调用addPathToBlackList。Runtime.spec.ts:新增测试断言,验证外部URL(http://aaa.com)不被黑名单机制处理。

代码审查工作量估计

🎯 2 (Simple) | ⏱️ ~10 分钟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description contains the complete template structure with all required sections for dependency checks and commit message verification. However, the author has not actually completed the checklist—all checkboxes remain unchecked with no deliberate selections or confirmations provided. Based on the code changes (narrowing blacklist path logic and adding tests for external URLs), this appears to be a bug fix that should trigger the "问题修复" (Bug Fixes) section with corresponding confirmations about testing and verification. The description is merely a template copy rather than a meaningful completion of required pre-merge checks. The author must complete the PR description checklist by: selecting one of the two dependency check options based on whether new upstream features are used; identifying the change type (this appears to be a bug fix based on the code changes); and checking the corresponding sub-items such as confirming test coverage exists and manual verification has been performed. The template should not be left entirely unchecked, as this prevents proper tracking of change management and changelog generation.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed PR标题"fix(Router): ignore blacklist paths of external link"清晰准确地反映了变更的主要内容。根据文件摘要,此次修改确实聚焦于修复外部链接黑名单路径的处理问题:Router.ts中的黑名单路径添加逻辑被优化,现在只在路径有效且以"/"开头时才调用,Runtime.spec.ts中相应的测试也被更新以验证外部URL被正确忽略。标题简洁具体,没有使用模糊措辞,能够帮助开发者快速理解核心改动。
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch williamcai/v3/runtime/Router/ignore_blacklist_paths_of_external_link

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.20%. Comparing base (3f7bc23) to head (4ba719a).
⚠️ Report is 2 commits behind head on v3.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##               v3    #4810   +/-   ##
=======================================
  Coverage   95.20%   95.20%           
=======================================
  Files         212      212           
  Lines        9317     9317           
  Branches     1792     1792           
=======================================
  Hits         8870     8870           
  Misses        328      328           
  Partials      119      119           
Files with missing lines Coverage Δ
packages/runtime/src/internal/Router.ts 95.37% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@weareoutman weareoutman enabled auto-merge October 20, 2025 09:03
@cypress
Copy link

cypress bot commented Oct 20, 2025

next-core    Run #11757

Run Properties:  status check passed Passed #11757  •  git commit b3bc90dbae ℹ️: Merge 4ba719a4ccb46dda95b294d5d19cf5988c041e4c into 3f7bc23add4cab94cd85dbc65114...
Project next-core
Branch Review williamcai/v3/runtime/Router/ignore_blacklist_paths_of_external_link
Run status status check passed Passed #11757
Run duration 00m 27s
Commit git commit b3bc90dbae ℹ️: Merge 4ba719a4ccb46dda95b294d5d19cf5988c041e4c into 3f7bc23add4cab94cd85dbc65114...
Committer William Cai
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 17
View all changes introduced in this branch ↗︎

@weareoutman weareoutman merged commit ff3844f into v3 Oct 20, 2025
9 checks passed
@weareoutman weareoutman deleted the williamcai/v3/runtime/Router/ignore_blacklist_paths_of_external_link branch October 20, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants