This commit is contained in:
@@ -75,9 +75,6 @@ def build_markdown_notification(
|
||||
"""
|
||||
parts: List[str] = []
|
||||
|
||||
# 统一格式化 @ 用户名
|
||||
mention_user = push_user if push_user.startswith("@") else f"@{push_user}"
|
||||
|
||||
# 所有 API 级变更(新增、修改路径、修改请求方式、删除、参数变更)统一走 model1.md 路径变更通知
|
||||
method_changed_reports = [r for r in reports if r.is_method_changed]
|
||||
renamed_reports = [r for r in reports if r.is_renamed_endpoint]
|
||||
@@ -147,7 +144,7 @@ def build_markdown_notification(
|
||||
if changed_reports:
|
||||
parts.append("# API参数变更通知")
|
||||
parts.append(f"- **变更类型:** 修改参数")
|
||||
parts.append(f"- **修改人:** {mention_user}")
|
||||
parts.append(f"- **修改人:** {push_user}")
|
||||
parts.append(f"- **修改时间:** {push_time}")
|
||||
parts.append("")
|
||||
for report in changed_reports:
|
||||
@@ -291,8 +288,6 @@ def build_path_change_markdown(
|
||||
- URI 详情使用列表(更直观)
|
||||
- 「修改请求方式」额外展示方法变更
|
||||
"""
|
||||
mention_user = push_user if push_user.startswith("@") else f"@{push_user}"
|
||||
|
||||
# 变更类型高亮
|
||||
type_highlight = f"<font color=\"warning\">**{change_type}**</font>"
|
||||
|
||||
@@ -315,7 +310,7 @@ def build_path_change_markdown(
|
||||
"",
|
||||
f" 变更类型: {type_highlight}",
|
||||
f" 全路径类名: {class_highlight}",
|
||||
f" 修改人: {mention_user}",
|
||||
f" 修改人: {push_user}",
|
||||
f" 修改时间: {push_time}",
|
||||
"",
|
||||
"---------------",
|
||||
@@ -342,8 +337,6 @@ def build_method_change_markdown(
|
||||
格式参考 model1.md,但专门针对 HTTP 方法变更场景设计,
|
||||
突出「原请求方式 → 新请求方式」的对比。
|
||||
"""
|
||||
mention_user = push_user if push_user.startswith("@") else f"@{push_user}"
|
||||
|
||||
type_highlight = '<font color="warning">**修改请求方式**</font>'
|
||||
class_highlight = f'<font color="info">**{file_name}**</font>'
|
||||
uri_highlight = f'<font color="info">**`{uri}`**</font>'
|
||||
@@ -355,16 +348,17 @@ def build_method_change_markdown(
|
||||
"",
|
||||
f" 变更类型: {type_highlight}",
|
||||
f" 全路径类名: {class_highlight}",
|
||||
f" 修改人: {mention_user}",
|
||||
f" 修改人: {push_user}",
|
||||
f" 修改时间: {push_time}",
|
||||
"",
|
||||
"---------------------------------",
|
||||
"---------------------------------------",
|
||||
"",
|
||||
"#### 【请求方式变更详情】",
|
||||
f"- **URI:** {uri_highlight}",
|
||||
f"- **原请求方式:** {old_m}",
|
||||
f"- **新请求方式:** {new_m} ← <font color=\"info\">**请求方式已变更**</font>",
|
||||
"",
|
||||
"---------------------------------------",
|
||||
]
|
||||
return "\n".join(parts).strip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user