Skip to content

Commit

Permalink
Return requested commit if matched configure regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
cinek810 committed Oct 12, 2023
1 parent 9f0bc47 commit 8923718
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ansible-deployer
version = 0.0.44
version = 0.0.45
description = Wrapper around ansible-playbook allowing configurable tasks and permissions
long_description = file: README.md
long_description_content_type = text/markdown; charset=UTF-8
Expand Down
5 changes: 3 additions & 2 deletions source/modules/validators/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ def validate_commit(self, options: dict, config: dict):
for elem in item["allowed_for"]:
available_commits = elem.get("commit", [])
for commit in available_commits:
if re.fullmatch(commit, options["commit"]):
commit_id = commit
commit_id = re.fullmatch(commit, options["commit"])
if commit_id:
commit_id = commit_id.group()
self.logger.debug("Using commit: %s .", commit_id)
break
else:
Expand Down

0 comments on commit 8923718

Please sign in to comment.