Skip to content

Commit 5fc68a2

Browse files
committed
Fix tests
1 parent 4b64cf2 commit 5fc68a2

File tree

97 files changed

+187
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+187
-170
lines changed

process_pr_v2.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,10 +1608,10 @@ def should_ignore_issue(repo_config: types.ModuleType, repo: Any, issue: Any) ->
16081608

16091609
# Check if body has ignore marker on first line
16101610
if issue.body:
1611-
# Get first non-blank line, ASCII-only for matching
1611+
# Get first non-blank line
16121612
try:
1613-
first_line = issue.body.encode("ascii", "ignore").decode().split("\n", 1)[0].strip()
1614-
if first_line and re.search(CMSBOT_IGNORE_MSG, first_line, re.IGNORECASE):
1613+
first_line = issue.body.split("\n", 1)[0].strip()
1614+
if first_line and RE_CMS_BOT_IGNORE.search(first_line):
16151615
return True
16161616
except Exception:
16171617
pass
@@ -4037,18 +4037,21 @@ def check_ci_test_completion(context: PRContext) -> Optional[Dict[str, str]]:
40374037
"""
40384038
statuses = get_ci_test_statuses(context)
40394039

4040-
if not statuses["required"] and not statuses["optional"]:
4040+
required_results = statuses.get("required", [])
4041+
optional_results = statuses.get("optional", [])
4042+
4043+
if not required_results and not optional_results:
40414044
return None
40424045

40434046
lab_stats: Dict[str, str] = {}
40444047

40454048
# Check required tests
4046-
if statuses["required"]:
4049+
if required_results:
40474050
all_success = True
40484051
any_error = False
40494052
any_pending = False
40504053

4051-
for result in statuses["required"]:
4054+
for result in required_results:
40524055
if result.status == "pending":
40534056
any_pending = True
40544057
elif result.status == "error":
@@ -4061,11 +4064,11 @@ def check_ci_test_completion(context: PRContext) -> Optional[Dict[str, str]]:
40614064
lab_stats["required"] = "success" if all_success and not any_error else "error"
40624065

40634066
# Check optional tests
4064-
if statuses["optional"]:
4067+
if optional_results:
40654068
all_success = True
40664069
any_pending = False
40674070

4068-
for result in statuses["optional"]:
4071+
for result in optional_results:
40694072
if result.status == "pending":
40704073
any_pending = True
40714074
elif result.status != "success":

tests/ReplayData/test_assign_category/Issue_1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"login": "alice",
1818
"id": 2
1919
},
20-
"created_at": "2025-11-28T14:02:08.116103+00:00"
20+
"created_at": "2025-12-03T11:29:03.894856+00:00"
2121
}
2222
]
2323
}

tests/ReplayData/test_assign_category/PullRequest_1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
"commit": {
3232
"message": "Test commit",
3333
"author": {
34-
"date": "2025-11-28T14:02:08.116158+00:00",
34+
"date": "2025-12-03T11:29:03.894956+00:00",
3535
"name": "Test Author",
3636
"email": "[email protected]"
3737
},
3838
"committer": {
39-
"date": "2025-11-28T14:02:08.116162+00:00",
39+
"date": "2025-12-03T11:29:03.894963+00:00",
4040
"name": "Test Committer",
4141
"email": "[email protected]"
4242
}

tests/ReplayData/test_assign_category_with_hyphen/Issue_1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"login": "alice",
1818
"id": 2
1919
},
20-
"created_at": "2025-11-28T14:02:08.338684+00:00"
20+
"created_at": "2025-12-03T11:29:04.577488+00:00"
2121
}
2222
]
2323
}

tests/ReplayData/test_assign_category_with_hyphen/PullRequest_1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
"commit": {
3232
"message": "Test commit",
3333
"author": {
34-
"date": "2025-11-28T14:02:08.338774+00:00",
34+
"date": "2025-12-03T11:29:04.577594+00:00",
3535
"name": "Test Author",
3636
"email": "[email protected]"
3737
},
3838
"committer": {
39-
"date": "2025-11-28T14:02:08.338782+00:00",
39+
"date": "2025-12-03T11:29:04.577602+00:00",
4040
"name": "Test Committer",
4141
"email": "[email protected]"
4242
}

tests/ReplayData/test_assign_from_package/Issue_1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"login": "alice",
1818
"id": 2
1919
},
20-
"created_at": "2025-11-28T14:02:08.120903+00:00"
20+
"created_at": "2025-12-03T11:29:03.899788+00:00"
2121
}
2222
]
2323
}

tests/ReplayData/test_assign_from_package/PullRequest_1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
"commit": {
3232
"message": "Test commit",
3333
"author": {
34-
"date": "2025-11-28T14:02:08.120992+00:00",
34+
"date": "2025-12-03T11:29:03.899876+00:00",
3535
"name": "Test Author",
3636
"email": "[email protected]"
3737
},
3838
"committer": {
39-
"date": "2025-11-28T14:02:08.121000+00:00",
39+
"date": "2025-12-03T11:29:03.899883+00:00",
4040
"name": "Test Committer",
4141
"email": "[email protected]"
4242
}

tests/ReplayData/test_assign_mixed_valid_invalid/Issue_1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"login": "alice",
1818
"id": 2
1919
},
20-
"created_at": "2025-11-28T14:02:08.316351+00:00"
20+
"created_at": "2025-12-03T11:29:04.548992+00:00"
2121
}
2222
]
2323
}

tests/ReplayData/test_assign_mixed_valid_invalid/PullRequest_1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
"commit": {
3232
"message": "Test commit",
3333
"author": {
34-
"date": "2025-11-28T14:02:08.316440+00:00",
34+
"date": "2025-12-03T11:29:04.549086+00:00",
3535
"name": "Test Author",
3636
"email": "[email protected]"
3737
},
3838
"committer": {
39-
"date": "2025-11-28T14:02:08.316448+00:00",
39+
"date": "2025-12-03T11:29:04.549094+00:00",
4040
"name": "Test Committer",
4141
"email": "[email protected]"
4242
}

tests/ReplayData/test_assign_multiple_categories/Issue_1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"login": "alice",
1818
"id": 2
1919
},
20-
"created_at": "2025-11-28T14:02:08.304955+00:00"
20+
"created_at": "2025-12-03T11:29:04.532514+00:00"
2121
}
2222
]
2323
}

0 commit comments

Comments
 (0)