This commit is contained in:
@@ -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}",
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user