[Asterisk-code-review] digium commits: Make module more tolerant to input data; add... (repotools[master])

Mark Michelson asteriskteam at digium.com
Wed Apr 22 12:05:05 CDT 2015


Mark Michelson has posted comments on this change.

Change subject: digium_commits: Make module more tolerant to input data; add some enhancements
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/178/1/digium_commits.py
File digium_commits.py:

Line 74:                 regex = "{0} #close".format(regex)
If we're trying to be tolerant of variances in user input, I suggest altering this regex to

{0}\s*#close

That way any number of whitespace characters can be used to separate the issue number and the #close command.


Line 94:         for match in re.finditer("[Tt]ested ?-?[Bb]y:?(.*)", self.message):
The " ?-?" construct is a bit odd here. I'd think you'd want to have either a hyphen or some number of whitespace characters. This seems like a better fit:

(\s*|-)

Same goes for the "Reported by" regex later in the file. If you make this change, just be sure to also change the subsequent match.group(1) to match.group(2) since you've added a new set of parens to the regex.


-- 
To view, visit https://gerrit.asterisk.org/178
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I05a3d667b9d56465232eb293682a66fe97c3aaef
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list