Commit df06fe11 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

parsemail: Be more liberal about line ending in pull requests

Requests generated via `git request-pull` are not meant to be sent in
any standardized way, so users often copy the text to their email client
of choice. This can cause the line endings to be mangled into any
combination of '\r' and '\n'.

Let's be more liberal about what we take with regards to newlines.
Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 2c142a43
......@@ -228,7 +228,7 @@ def mail_headers(mail):
def find_pull_request(content):
git_re = re.compile(r'^The following changes since commit.*' +
r'^are available in the git repository at:\n'
r'^are available in the git repository at:\s+' +
r'^\s*([\S]+://[^\n]+)$',
re.DOTALL | re.MULTILINE | re.IGNORECASE)
match = git_re.search(content)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment