API变更整合
All checks were successful
类变更检测 / class-change-check (push) Successful in 17s

This commit is contained in:
2026-06-09 11:02:06 +08:00
parent 46988e63fa
commit fb6cd124c8
27 changed files with 2140 additions and 20 deletions

View File

@@ -106,12 +106,12 @@ def _format_param_details_section(report: EndpointChangeReport) -> List[str]:
def _format_endpoint_block(report: EndpointChangeReport) -> str:
"""
格式化单个接口块,按模板匹配格式输出。
路径类名显示为 source_file相对仓库根的完整 .java 路径)。
路径显示为 source_file相对仓库根的完整 .java 路径)。
"""
change_type = "新增接口" if report.is_new_endpoint else ("删除接口" if report.is_removed_endpoint else "修改参数")
uri_line = f"**{report.http_method}** `{report.uri}`"
file_path = report.source_file or report.controller_class
class_line = f"- **路径类名** <font color=\"info\">**{file_path}**</font>"
class_line = f"- **路径:** <font color=\"info\">**{file_path}**</font>"
header = [
f"- **变更类型:** <font color=\"warning\">**{change_type}**</font>",
@@ -441,7 +441,7 @@ def build_path_change_markdown(
# 变更类型高亮
type_highlight = f"<font color=\"warning\">**{change_type}**</font>"
# 路径类名高亮
# 路径高亮
class_highlight = f"<font color=\"info\">**{file_name}**</font>"
# 根据变更类型优化 URI 展示
@@ -459,7 +459,7 @@ def build_path_change_markdown(
"# 【API路径变更通知】",
"",
f" 变更类型: {type_highlight}",
f" 路径类名 {class_highlight}",
f" 路径: {class_highlight}",
f" 修改人: {push_user}",
f" 修改时间: {push_time}",
"",
@@ -496,7 +496,7 @@ def build_method_change_markdown(
"# 【API请求方式变更通知】",
"",
f" 变更类型: {type_highlight}",
f" 路径类名 {class_highlight}",
f" 路径: {class_highlight}",
f" 修改人: {push_user}",
f" 修改时间: {push_time}",
"",