-
a regexp config would be the best... but @robin already reject that proposal https://code.onedev.io/projects/160/issues/166
-
Currently the full regex used is
(^|[\W|/]+)(fix|fixed|fixes|fixing|resolve|resolved|resolves|resolving|close|closed|closes|closing)\s+issue\s+(\w([\w-/\.]*\w)?)?#(\d+)(?=$|[\W|/]+)You can go to https://regex101.com then choose Java8 flavor on the left and paste the regex. Then you can play with the Test string.
For example it matches commit messages like:
Short commit title Maecenas sed diam eget risus varius blandit sit amet non magna. Vestibulum id ligula porta felis euismod semper. Nullam id dolor id nibh ultricies vehicula ut id elit. Maecenas faucibus mollis interdum. fixes issue project-name#123 -
OneDev
changed state to 'Closed' 3 years ago
Previous Value Current Value Open
Closed
-
State changed as code fixing the issue is committed (33df8011)
-
OneDev
changed state to 'Released' 3 years ago
Previous Value Current Value Closed
Released
-
State changed as build #3627 is successful
-
This can now be customized via
commit message fix patternsin issue setting
| Type |
Improvement
|
| Priority |
Normal
|
| Assignee |
Issue Votes (0)
From: https://code.onedev.io/projects/162/blob/main/pages/fix-issues-via-commit-message.md
I hope I can put this in the middle of the message, not neccessarily the beggining:
[fix|fixing|fixed|resolve|resolving|resolved] issue #[issue number] [:optional issue description]I'm using conventional commit practice so commit messages fixing bugs will always start with:
fix: xxxorfix(something): xxx