Skip to content

Commit

Permalink
RM#25252 - any position for RM tag
Browse files Browse the repository at this point in the history
  • Loading branch information
grzybniak committed Dec 20, 2021
1 parent f9f9824 commit 379fb0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions redmine_commit_msg/redmine_commit_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def get_redmine_issue(branch_name):


def valid_commit_message(message):
if not re.match(MESSAGE_REGEX, str(message)):
if not re.match(BRANCHNAME_REGEX, str(current_branch_name())):
if not re.findall(MESSAGE_REGEX, str(message)):
if not re.findall(BRANCHNAME_REGEX, str(current_branch_name())):
return False
return True

Expand Down
4 changes: 2 additions & 2 deletions redmine_commit_msg/redmine_commit_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def get_redmine_issue(branch_name):


def get_redmine_issue_id(message):
if re.match(MESSAGE_REGEX, str(message)):
if re.findall(MESSAGE_REGEX, str(message)):
match = re.search(MESSAGE_REGEX, message)
rm_issue_id = match.group(2)
return rm_issue_id

if re.match(BRANCHNAME_REGEX, str(current_branch_name())):
if re.findall(BRANCHNAME_REGEX, str(current_branch_name())):
match = re.search(BRANCHNAME_REGEX, str(current_branch_name()))
rm_issue_id = match.group(2)
return rm_issue_id
Expand Down

0 comments on commit 379fb0a

Please sign in to comment.