Last active
May 5, 2022 13:40
-
-
Save Snailedlt/70750393a2f1bdc7cb612e54949dca12 to your computer and use it in GitHub Desktop.
Simplified version of the GitLab's regex pattern to autoclose issues with commit messages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\b((?:[Cc]los(?:e[sd]?|ing)|\b[Ff]ix(?:e[sd]|ing)?|\b[Rr]esolv(?:e[sd]?|ing)|\b[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?(?:(?:#\d+)|(?:#\d+))(?:(?: *,? +and +| *,? *)?)|([A-Z][A-Z0-9_]+-\d+))+) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can test it out here: https://regex101.com/
Based on GitLab's
issue_closing_pattern
found here and here, and tested here