classGitHubCommitMessage...# issues that this commit msg closes.## returns an array of issue #'s, or an empty array if no match.#defcloses_any_issues?@commit_msg.scan(/(?:(?:fix|clos)(?:e[ds]?)?)\s*#\s*([1-9][0-9]*)+/i).flatten.map(&:to_i)end# issues that this commit msg refers to (not counting fixing/closing).## returns an array of issue #'s, or an empty array if no match.#defrefers_to_any_issues?@commit_msg.scan(/(?:(?:ref(?:er)?s?)\s*#\s*([1-9][0-9]*))+/i).flatten.map(&:to_i)end...end# feel free to add specs
By Administrator on 2012-03-30T11:28:32 (imported from GitLab)
+1 This would be very nice. A setting to make it dependent on the branch that it was pushed to would be awesome, so for example only commits merged into master could close issues.
By Administrator on 2012-09-20T18:46:07 (imported from GitLab)
👍 - definitely something I'd prefer to see supported within GitLab, not as a Git hook.
In our case, the web API in accessible from many locations due to network policy, while the SSH access is permitted due to there being key-based authentication. Using hooks is infeasible for us.
By Administrator on 2013-02-15T03:35:04 (imported from GitLab)