Make "1st time contribution" badge persist with the merge request
In its current implementation this badge disappears as soon as the open MR gets merged. That is to say there is no persistent property in the merge request model that identifies a MR as someone's "first". It must be inferred from the database with something like "if author exists in project's list of contributors, show badge, else do nothing" which is calculated every time the page is loaded.
This means we have no way to filter MRs by first-time contributors, and we have no way to see historically whether a merged MR was a first time contribution. Both of these would be useful features for open source projects looking to highlight and encourage community contribution.
For instance, we are currently discussing the possibility of calling out first-time contributors in our GitLab release posts (gitlab-com/www-gitlab-com!12647 (comment 87918094))
I think there are two ways we could accomplish this:
- make a "first time contribution" flag in the merge request database model which gets populated when the merge request is opened
- create some sort of "automatic label" that gets applied to first-time contributors. we could have labels that get auto-applied based on rules set up per-project
Option 2 is more complicated, but could have other interesting use-cases that would make it worth the effort. (for example, auto-apply the frontend badge when a MR contains changes to files ending in
*.js, or add ~"Community Contribution" when a MR is opened by a non-project-member)