[PATCH] parser: Handle 'git-request-pull' mails from Git 2.14.3

Stephen Finucane stephen at that.guru
Fri Jan 19 00:22:47 AEDT 2018


On Thu, 2018-01-18 at 16:59 +1100, Daniel Axtens wrote:
> Stephen Finucane <stephen at that.guru> writes:
> 
> > Make the regex case insensitive to catch both 'git' and 'Git'.
> > 
> > Signed-off-by: Stephen Finucane <stephen at that.guru>
> 
> 
> > Fixes: #159
> > ---
> >  patchwork/parser.py                                |   2 +-
> >  .../mail/0017-git-pull-request-git-2-14-3.mbox     | 164
> > +++++++++++++++++++++
> >  patchwork/tests/test_parser.py                     |   7 +
> >  3 files changed, 172 insertions(+), 1 deletion(-)
> >  create mode 100644 patchwork/tests/mail/0017-git-pull-request-git-
> > 2-14-3.mbox
> > 
> > diff --git a/patchwork/parser.py b/patchwork/parser.py
> > index 3acc6096..ac7dc5fe 100644
> > --- a/patchwork/parser.py
> > +++ b/patchwork/parser.py
> > @@ -833,7 +833,7 @@ def parse_pull_request(content):
> >      git_re = re.compile(r'^The following changes since commit.*' +
> >                          r'^are available in the git repository
> > at:\n'
> 
> You could also have used 'the [gG]it repository', but your way means
> that if someone decides to be 'cool' and send 'ThE fOlLoWinG cHaNgEs
> SiNcE cOMMit'... we will catch that too, which is probably better.

That was my thinking.

> Reviewed-by: Daniel Axtens <dja at axtens.net>
> 
> I'm happy to poke the OzLabs admins on irc once this is merged - they
> are more than capable of dealing with a local patch so a release is
> probably not a prerequisite here.

Spot on. This is available on master and stable/2.0 now.

Stephen


More information about the Patchwork mailing list