#4179 Add support for the "resolve" keyword
Merged 5 years ago by pingou. Opened 5 years ago by pingou.

@@ -30,6 +30,7 @@ 

  - relate/related/relates

  - merge/merges/merged

  - close/closes/closed

+ - resolve/resolves/resolved

  

  Examples:

  

file modified
+2 -2
@@ -21,7 +21,7 @@ 

  

  FIXES = [

      re.compile(r"(?:.*\s+)?{0}?[sd]?:?\s*?#(\d+)".format(kw), re.I)

-     for kw in ["fixe", "merge", "close"]

+     for kw in ["fix", "fixe", "merge", "close", "resolve"]

  ]

  FIXES += [

      re.compile(
@@ -31,7 +31,7 @@ 

          ),

          re.I,

      )

-     for kw in ["fixe", "merge", "close"]

+     for kw in ["fix", "fixe", "merge", "close", "resolve"]

  ]

  

  

@@ -275,6 +275,12 @@ 

          project_match(

              'Fixes: http://localhost.localdomain/fedpkg/issue/220',

              ('/fedpkg/issue/220',))

+         project_match(

+             'resolved: http://localhost.localdomain/fork/pingou/test/issue/1234#foo',

+             ('/fork/pingou/test/issue/1234',))

+         project_match(

+             'resolve http://localhost.localdomain/fork/pingou/test/issue/1234#foo',

+             ('/fork/pingou/test/issue/1234',))

  

          # issue matches

          def issue_match(text, issue):
@@ -288,12 +294,24 @@ 

              self.assertEqual(match.group(1), issue)

  

          issue_match('This fixed  #5', '5')

+         issue_match('This fix  #5', '5')

          issue_match('Merged  #17', '17')

          issue_match('Fixed:  #23', '23')

+         issue_match('Fix:  #23', '23')

          issue_match('This commit fixes:  #42', '42')

+         issue_match('This commit fix   #42', '42')

          issue_match('Merge #137', '137')

          issue_match('Merges #137', '137')

          issue_match('Merges: #137', '137')

+         issue_match('resolve #137', '137')

+         issue_match('Resolves #137', '137')

+         issue_match('RESOLVED: #137', '137')

+         issue_match(

+             'Fixes: http://localhost.localdomain/fedpkg/issue/220',

+             '/fedpkg/issue/220')

+         issue_match(

+             'Resolved: http://localhost.localdomain/fedpkg/issue/222',

+             '/fedpkg/issue/222')

  

          # no match

          def no_match(text):

no initial comment

rebased onto d005a9b967f7108799d5103ddf901ae8e704cd46

5 years ago

Shouldn't this be fix?

Shouldn't this be fix?

Then "Fix" should be added to the list as otherwise "fixes" and "fixed" won't be recognized

The documentation added here says it accepts Fix, so I guess it should be.

rebased onto cac99435c3643eed5d90caa4d2c41ce30b5fca1d

5 years ago

rebased onto 5928a9fae1d6b53ae2d3036c98880d5faef1ca60

5 years ago

pretty please pagure-ci rebuild

5 years ago

rebased onto 1a7dcb2

5 years ago

pretty please pagure-ci rebuild

5 years ago

Pull-Request has been merged by pingou

5 years ago