gitlabhq/gitlabhq — pull request #1208 by tsigo (2012-08-09 02:01:43+00:00)
Title: Consolidate functionality shared between Issue and MergeRequest

### Summary

Any associations, validations, delegates, scopes and methods that were exactly the same in both Issue and MergeRequest models have been moved to a new IssueCommonality module (role) that gets included by each class.

There was actually quite a bit of duplication, because MergeRequests are basically just specialized Issues.

### "IssueCommonality"?

I had a bit of a hard time coming up with a name for the module, and I'm still not entirely satisfied with it, but I think it does a good enough job of describing what it does without being too verbose.

> commonality |ˌkämənˈalitē|
noun ( pl. commonalities )
1 the state of sharing features or attributes: a commonality of interest ensures cooperation.

### Specs?

First, there's probably now a bit of duplication in the model specs for these two classes, but I haven't done anything with that yet.

Second, I was unable to get a full development environment running that actually passed all the tests _before_ I made these changes. I did run the two model specs, and those passed, but a quick "Developer Bootstrap" guide on the wiki or something would be much appreciated, and probably get the project some more contributors.