gitlabhq/gitlabhq — pull request #4507 by smashwilson (2013-07-07 01:30:13+00:00)
Title: WIP: Linking objects from GFM references

Hello!

This is an implementation in progress of [linking issues from comments](http://feedback.gitlab.com/forums/176466-general/suggestions/3692754-linking-issue-references), also referenced in #2676, #2714, #1170, #302, and probably others. I'm pushing it out now to get early feedback on what I've already done and to hear any thoughts about edge cases I might not be accounting for.

Any mention of issues, merge requests, or commits via GitLab-flavored markdown references in descriptions, titles or follow-on notes to any of the above attaches a system note to the referenced object containing a backtracking link. Furthermore, pushing commits that match a (configurable) regexp to a project's default branch will close any issues mentioned in the closing phrase.

**Work-in-progress**

Left to do:

- [ ] Only close issues from commits pushed to the project's default branch -- meaning, actually make it do that thing I said it does :wink:
- [ ] If any `Mentionable` is edited, create additional cross-references for any references that weren't there to begin with.
- [ ] Exercise it in dev mode a little more to see if I can identify any other edge cases.
- [ ] Do a final rebase and squash on upstream master.