Skip to content

Commit 72c8096

Browse files
authored
Fix msg_ method calculation in notifiers (#23)
1 parent 7b7dcd0 commit 72c8096

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.2.1
2+
3+
- [FIXED] Notifier `msg_` methods are now accurately found based on check `test_` method names.
4+
15
# 1.2.0
26

37
- [NEW] Added branch option to retrieving commit details from the Github service.

compliance/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515
"""Compliance automation package."""
1616

17-
__version__ = '1.2.0'
17+
__version__ = '1.2.1'

compliance/notify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def messages(self):
6262

6363
msg_method = 'get_notification_message'
6464
if len(test_obj.tests) > 1:
65-
candidate = method_name.replace('test_', 'msg_')
65+
candidate = method_name.replace('test_', 'msg_', 1)
6666
if hasattr(test_obj, candidate):
6767
msg_method = candidate
6868

0 commit comments

Comments
 (0)