GitTools / GitReleaseManager

Tool for creating and exporting releases for software applications hosted on GitHub
https://gittools.github.io/GitReleaseManager/docs/
MIT License
303 stars 39 forks source link

Allowing labels to be renamed from an existing label #492

Open davidzwa opened 1 year ago

davidzwa commented 1 year ago

Detailed Description

I propose a extension of the label array model in the Configuration. Specifically I aim to introduce GRM in existing repo's without deleting existing labels, but instead renaming them automatically from old names.

Context

When introducing OR updating GRM labels on a repo, I would love to be able to rename existing labels to a new format. This allows me to update my existing repositories to a new label format with very little effort.

Possible Implementation

Add an optional field called RenameFrom, which when specified will take existing labels and run over the repository to rename them instead of deleting all and creating specific ones.

Instead of deleting all, we determine which ones to delete and which ones to rename. Then we still delete the specific ones to be deleted, and secondly run over the ones to rename. We'd need a new IGithubClient method to do this.

I believe OctoKit has this, looking at its models:

Your Environment

davidzwa commented 1 year ago

Willing to PR this, awaiting for approval.

gep13 commented 1 year ago

@davidzwa I have added a comment to your PR, but also going to reply here... I think this is a good idea. Let me take a look at your PR, and I will get back to you.