Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#492 feat: renaming label Name using RenameFrom in Configuration #493

Closed

Conversation

davidzwa
Copy link

Description

Introduce a change to the label command and service method to rename existing labels using an optional RenameFrom property. This property is then used to rename the label with the UpdateLabel OctoKit API call. If the RenameFrom property does not match any existing label, the associated label will still be deleted as we're used to, but also a warning is thrown to make the user aware that they might have lost a label in the process.

Related Issue

#492

Motivation and Context

It makes integrating existing repos or migrating already GRM equipped repos to new label formats easier.
Instead of

How Has This Been Tested?

Could not get that to work (yet). Waiting for feedback first, hope to update the PR accordingly.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@gep13
Copy link
Member

gep13 commented Jun 19, 2023

Oooo, this is a very interesting idea!

This isn't an area that GitReleaseManager was originally intended to move into, but I can see a use for this!

Let me take this for a spin at some point, and provide some feedback.

@davidzwa
Copy link
Author

davidzwa commented Jun 20, 2023

Oooo, this is a very interesting idea!

This isn't an area that GitReleaseManager was originally intended to move into, but I can see a use for this!

Let me take this for a spin at some point, and provide some feedback.

Thanks for the interest!
Logically the code needs to be scrutinized: I had not setup Rider to be able to run the tests in the test runner. I guess some setup with Cake is involved? At least I saw test failures in terminal test runs.

One point of doubt: I think labels should never be removed (just keep the warning), or a configuration flag could be added to avoid removal for existing repos. Example: I lost all the label references in my test repo because they were removed, even though the same labels were recreated in the end. Therefore all issues involved were dangling/orphaned.
I would love to help make GRM be suitable for adapting to existing repos, instead of the repo adjusting to GRM. What do you think?

@davidzwa davidzwa closed this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants