"Generate a default set of labels" button should use site-wide defaults from admin area
Problem to solve
After administrators have created a set of default, site-wide labels in the admin area, pre-existing projects will still use hard-coded defaults from lib/gitlab/issues_labels.rb when the "Generate a default set of labels" button is clicked.
Intended users
Any user with the ability to manage labels for a project they're assigned to; in particular:
- users/admins with new GitLab CE/EE installations where their site admin didn't think to add site-wide labels until after most of the projects had been created, or
- users/admins who have been using GitLab for a long time, and had created a bunch of projects before the site-wide label feature existed
Further details
People have been hacking lib/gitlab/issues_labels.rb to change the default set of labels since 2014.
As there is a UI for creating a "default set of labels" in the admin area, it might make more sense if those labels were the ones added to a project when "Generate a default set of labels" is clicked in the "Labels" area of a pre-existing project.
Proposal
Modify lib/gitlab/issues_labels.rb to read the site-wide labels instead of using a list of hard-coded defaults.