Skip to content

Commit

Permalink
fix: 修复修改配置流程中忘记修改标题的问题 (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 authored Dec 2, 2024
1 parent e554ee2 commit fe83aad
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/

- 修复重新测试时没有提示测试进行中的问题
- 修复机器人修改议题等操作时仍会触发响应器的问题
- 修复修改配置流程中忘记修改标题的问题

## [4.1.1] - 2024-12-01

Expand Down
3 changes: 3 additions & 0 deletions src/plugins/github/plugins/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ async def handle_remove_check(
# 限制标题长度,过长的标题不好看
title = f"{result.type}: {result.name[:TITLE_MAX_LENGTH]}"

# 修改议题标题
await handler.update_issue_title(title)

if result.valid:
commit_message = f"{COMMIT_MESSAGE_PREFIX} {result.type.value.lower()} {result.name} (#{handler.issue_number})"

Expand Down
12 changes: 12 additions & 0 deletions tests/github/config/process/test_config_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,18 @@ async def test_process_config_check(
},
True,
)
ctx.should_call_api(
"rest.issues.async_update",
snapshot(
{
"owner": "he0119",
"repo": "action-test",
"issue_number": 80,
"title": "Plugin: name",
}
),
None,
)
ctx.should_call_api(
"rest.pulls.async_create",
snapshot(
Expand Down

0 comments on commit fe83aad

Please sign in to comment.