gotsunami / gitlab-copy

Batch copy issues between GitLab instances, with some cool features
MIT License
128 stars 20 forks source link

Copy labels from globals #18

Open jared-mackey opened 7 years ago

jared-mackey commented 7 years ago

I want to define labels at the site level and just copy to each project. How can I copy labels without specifying a project?

matm commented 7 years ago

@mackeyja92 What do you mean labels at site level? Aren't labels tied to projects? I can't find a link about global label definition.

There's no way to copy all labels from a source project to all other projects at the moment. There may be a need for that feature indeed.

Hufschmidt commented 7 years ago

I think he means group labels which can be created by going to [some group or sub-group] > issues > label. Group labels can be used in any project in this group but not any sub-group or sub-group project. Here is where gitlab-copy would come in handy.

matm commented 7 years ago

Yes, indeed. I wasn't aware of those. [some group] > edit > labels allows to define labels for all projects in a group. Thanks @Hufschmidt for pointing this out. How do you think gitlab-copy could handle it? Allow copying labels from one project to a group's labels? Maybe also allow copying of labels between groups.

Hufschmidt commented 7 years ago

Since labels of a group are currently only available in projects of that group, but not in projects in any of its sub-groups (gitlab discussion) my first use-case would be copying labels from one group to another.

Side-note: As far as I know project-labels can already be promoted to group-labels via gitlabs own gui, having this in gitlab-copy might still be usefull when trying to migrate a lot of labels from project to group though.

I have to admin though I don't know if there is an API endpoint for fetching or adding group-level labels, last time I looked I didn't find any documentation on this...

matm commented 5 years ago

Hey there! Is copying labels from one group to another still a wanted feature? Just want to know if I work on this (to be included to upcoming 0.7 release). Thanks!

zaventh commented 1 year ago

Copying labels from group to group even in a single instance would be very desirable @matm. Currently I have a crude script to do this with curl and jq.