Updated regex to check single line and added test case

This commit is contained in:
2020-06-16 12:01:11 -04:00
parent 485dc7bf95
commit b8af08b40a
2 changed files with 8 additions and 1 deletions

View File

@ -19,7 +19,7 @@ NOT_MAIN_BRANCH = Exception('Not merging into a main branch')
NO_GIT_FLOW = Exception('No git flow branch found')
# Important regex
GET_COMMIT_MESSAGE = re.compile(r"Merge (branch|pull request) '?([^']+)'? (into|from) (?:'(.+)'|[^\/]+\/(.+))")
GET_COMMIT_MESSAGE = re.compile(r"Merge (branch|pull request) '?([^']+)'? (into|from) (?:'(.+)'|[^\/]+\/([^\n\\]+))")
class SemVer(object):