fix(lint): F541 f-string 无占位符去掉 f 前缀
This commit is contained in:
+10
-10
@@ -403,7 +403,7 @@ async def _send_mention_mails(
|
||||
action_type="mention",
|
||||
steps=[
|
||||
"按上方 mention 模板中的 response_guidance 执行",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"source_type": source_type,
|
||||
@@ -475,7 +475,7 @@ async def _handle_pr_opened(payload: Dict[str, Any]) -> None:
|
||||
f"读取 PR diff(Gitea API: GET /repos/{repo}/pulls/{pr_number}.diff)",
|
||||
"按审查清单审查(参考 code-review Skill)",
|
||||
f"提交 Review(Gitea API: POST /repos/{repo}/pulls/{pr_number}/reviews)— APPROVE 或 REQUEST_CHANGES",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"pr_number": pr_number,
|
||||
@@ -603,7 +603,7 @@ async def _handle_pull_request_review(payload: Dict[str, Any]) -> None:
|
||||
steps=[
|
||||
f"查看评论(Gitea API: GET /repos/{repo}/issues/{pr_number}/comments)",
|
||||
"根据评论内容响应(修改代码或在 PR 上回复 comment)",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"pr_number": pr_number,
|
||||
@@ -637,14 +637,14 @@ async def _handle_pull_request_review(payload: Dict[str, Any]) -> None:
|
||||
if state == "APPROVED":
|
||||
tc_steps = [
|
||||
f"合并 PR(Gitea API: POST /repos/{repo}/pulls/{pr_number}/merge)",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
]
|
||||
else: # REQUEST_CHANGES
|
||||
tc_steps = [
|
||||
"按审查意见逐条修改代码",
|
||||
"push 到原分支 → CI 自动跑",
|
||||
"CI 通过后等重新 Review",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
]
|
||||
_send_toolchain_task(
|
||||
to_agent=pr_author,
|
||||
@@ -740,7 +740,7 @@ async def _handle_pr_synchronize(payload: Dict[str, Any]) -> None:
|
||||
f"读取 PR diff(Gitea API: GET /repos/{repo}/pulls/{pr_number}.diff)",
|
||||
"重点检查上次 Review 意见的修改部分",
|
||||
f"提交 Review(Gitea API: POST /repos/{repo}/pulls/{pr_number}/reviews)",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"pr_number": pr_number,
|
||||
@@ -772,7 +772,7 @@ def _send_deploy_failure_task(repo: str, pr_number: int, pr_title: str, reason:
|
||||
"检查 deploy 日志",
|
||||
"排查失败原因",
|
||||
"修复并重新部署",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"repo": repo,
|
||||
@@ -1002,7 +1002,7 @@ async def _handle_issues(payload: Dict[str, Any]) -> None:
|
||||
"push → 等 CI",
|
||||
f"CI 通过后创建 PR(Gitea API: POST /repos/{repo}/pulls)",
|
||||
"等 Review",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"issue_number": issue_number,
|
||||
@@ -1037,7 +1037,7 @@ async def _handle_issues(payload: Dict[str, Any]) -> None:
|
||||
"检查 deploy 日志",
|
||||
"排查失败原因",
|
||||
"修复并重新部署",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"repo": repo,
|
||||
@@ -1120,7 +1120,7 @@ async def _handle_issue_comment(payload: Dict[str, Any]) -> None:
|
||||
"查看完整 CI 日志(PR 页面或 Gitea Actions 页面)",
|
||||
"修复失败的测试",
|
||||
"push → CI 自动重跑",
|
||||
f"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
],
|
||||
context_data={
|
||||
"pr_number": issue_number,
|
||||
|
||||
Reference in New Issue
Block a user