Skip to content

Commit

Permalink
[Automation] Make release notes generator more forgiving (#1367)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedingber committed Sep 28, 2021
1 parent e6b0000 commit 89094d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automation/release_notes/generate.py
Expand Up @@ -19,8 +19,8 @@ class ReleaseNotesGenerator:
r"} "
r"(\[(?P<scope>[^\]]*)\])?"
r"( )?"
r"(?P<commitMessage>.*)"
r" "
r"(?P<commitMessage>.*?)"
r"[ ]*"
r"\("
r"(?P<pullRequestNumber>#[0-9]+)"
r"\)"
Expand Down
9 changes: 9 additions & 0 deletions tests/automation/release_notes/test_generate.py
Expand Up @@ -56,6 +56,15 @@ def test_commit_regex_matching():
"expected_commit_message": "Added H5 saving format",
"expected_pull_request_number": "#1055",
},
{
"commit_line": "a654a04e {Hedingber} [CI] Mistakenly removing the space(#685)"
"",
"expected_commit_id": "a654a04e",
"expected_username": "Hedingber",
"expected_scope": "CI",
"expected_commit_message": "Mistakenly removing the space",
"expected_pull_request_number": "#685",
},
]

for case in cases:
Expand Down

0 comments on commit 89094d0

Please sign in to comment.