On Mon, Dec 19, 2022 at 02:40:29PM +0100, Martin Liška wrote:
> contrib/ChangeLog:
> 
>       * gcc-changelog/git_commit.py: Allow digit in component name.
> 
> contrib/ChangeLog:
> 
>       * gcc-changelog/test_email.py: Add new test.
>       * gcc-changelog/test_patches.txt: Add new patch.
> ---
>  contrib/gcc-changelog/git_commit.py    |  2 +-
>  contrib/gcc-changelog/test_email.py    |  4 ++++
>  contrib/gcc-changelog/test_patches.txt | 25 +++++++++++++++++++++++++
>  3 files changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/contrib/gcc-changelog/git_commit.py 
> b/contrib/gcc-changelog/git_commit.py
> index e82fbcacd3e..7fde02cba85 100755
> --- a/contrib/gcc-changelog/git_commit.py
> +++ b/contrib/gcc-changelog/git_commit.py
> @@ -165,7 +165,7 @@ additional_author_regex = re.compile(r'^\t(?P<spaces>\ 
> *)?(?P<name>.*  <.*>)')
>  changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)ChangeLog:?')
>  subject_pr_regex = 
> re.compile(r'(^|\W)PR\s+(?P<component>[a-zA-Z+-]+)/(?P<pr>\d{4,7})')

What about the above regex, shouldn't that be adjusted too?

>  subject_pr2_regex = re.compile(r'[(\[]PR\s*(?P<pr>\d{4,7})[)\]]')
> -pr_regex = re.compile(r'\tPR (?P<component>[a-z+-]+\/)?(?P<pr>[0-9]+)$')
> +pr_regex = re.compile(r'\tPR (?P<component>[a-z0-9+-]+\/)?(?P<pr>[0-9]+)$')
>  dr_regex = re.compile(r'\tDR ([0-9]+)$')
>  star_prefix_regex = re.compile(r'\t\*(?P<spaces>\ *)(?P<content>.*)')
>  end_of_location_regex = re.compile(r'[\[<(:]')

        Jakub

Reply via email to