Skip to content

Commit

Permalink
RM#25236 check new hooks v0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
grzybniak committed Dec 20, 2021
1 parent 379fb0a commit dae197d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion redmine_commit_msg/redmine_commit_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

MESSAGE_REGEX = "(RM[#-]?)([0-9]{4,7})"
BRANCHNAME_REGEX = "(RM[#-]?)([0-9]{4,7})-"
GIT_REPOSITORY = "(gitlab)|(github)"
REDMINE_URL = os.getenv("REDMINE_URL")
REDMINE_TOKEN = os.getenv("REDMINE_TOKEN")

Expand All @@ -22,7 +23,7 @@ def git_addr_trim(addr):

def git_addr_repo(addr, commit_hash):
trim = git_addr_trim(addr)
if re.findall("(\.git)", trim):
if re.findall(GIT_REPOSITORY, trim):
REPO_URL_SCHEMA = os.getenv("REPO_URL_SCHEMA", "http")
git_addr = trim.split(":", 1)
url_syntax = "{}://{}/{}/commit/{}".format(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = redmine-commit-msg
version = 0.9.2
version = 0.9.4
description = Sending info about commits to redmine
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit dae197d

Please sign in to comment.