Skip to content

Commit ce60bfa

Browse files
authored
[ci] Add filter to teams (#11455)
This improves the parsing to avoid issues like in #11454 commit-id:53a06ab3 Co-authored-by: driazati <[email protected]>
1 parent a329df4 commit ce60bfa

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

tests/python/ci/test_ci.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ def run(type, data, check):
511511
"""
512512
comment2 = """
513513
something @person4
514+
@person5
514515
"""
515516
teams = {
516517
"data": {
@@ -731,6 +732,20 @@ def run(type, data, check):
731732
check="Dry run, would have updated issues/1234 with {'body': '@person2 @SOME1-ONE-\\n\\ncc @person1'}",
732733
)
733734

735+
run(
736+
type="ISSUE",
737+
data={
738+
"title": "[] A title",
739+
"number": 1234,
740+
"user": {
741+
"login": "person5",
742+
},
743+
"labels": [],
744+
"body": "@person2 @SOME1-ONE-",
745+
},
746+
check="No one to cc, exiting",
747+
)
748+
734749

735750
if __name__ == "__main__":
736751
tvm.testing.main()

tests/scripts/github_tag_teams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def add_tag(tag, users):
122122
for tag in result:
123123
result[tag] = list(set(result[tag]))
124124

125-
return {k.lower(): v for k, v in result.items()}
125+
return {k.lower(): v for k, v in result.items() if k.strip()}
126126

127127

128128
def tags_from_title(title: str) -> List[str]:

0 commit comments

Comments
 (0)