diff --git a/docs/input/docs/commands/label.md b/docs/input/docs/commands/label.md index c06db1ba..5d11d788 100644 --- a/docs/input/docs/commands/label.md +++ b/docs/input/docs/commands/label.md @@ -8,14 +8,15 @@ default labels, so that you can have some consistency across your various projects. While GitHub, and other Source Control systems provide a set of default labels, they are not always exactly what you want. This command will remove all the current labels configured within a repository, and create a new -set of them. +set of them. However, if RenameFrom is specified in the label configuration, the +label can be renamed instead of being deleted and recreated. :::{.alert .alert-info} **NOTE:** -The available list of labels that are created is currently hard-coded into -GitReleaseManager, it is not possible to configure them. This will come in a -later version. +The available list of labels that are created by default is currently hard-coded into +GitReleaseManager, it is possible to configure them by overriding the list. See +[Default Configuration](../configuration/default-configuration.md) for more details. ::: ## **Required Parameters** diff --git a/src/GitReleaseManager.Core.Tests/Commands/LabelCommandTests.cs b/src/GitReleaseManager.Core.Tests/Commands/LabelCommandTests.cs index 1762d911..816f6b29 100644 --- a/src/GitReleaseManager.Core.Tests/Commands/LabelCommandTests.cs +++ b/src/GitReleaseManager.Core.Tests/Commands/LabelCommandTests.cs @@ -32,13 +32,13 @@ public async Task Should_Execute_Command() RepositoryName = "repository", }; - _vcsService.CreateLabelsAsync(options.RepositoryOwner, options.RepositoryName) + _vcsService.CreateOrUpdateLabelsAsync(options.RepositoryOwner, options.RepositoryName) .Returns(Task.CompletedTask); var result = await _command.Execute(options).ConfigureAwait(false); result.ShouldBe(0); - await _vcsService.Received(1).CreateLabelsAsync(options.RepositoryOwner, options.RepositoryName).ConfigureAwait(false); + await _vcsService.Received(1).CreateOrUpdateLabelsAsync(options.RepositoryOwner, options.RepositoryName).ConfigureAwait(false); _logger.Received(1).Information(Arg.Any()); } } diff --git a/src/GitReleaseManager.Core.Tests/VcsServiceTests.cs b/src/GitReleaseManager.Core.Tests/VcsServiceTests.cs index 09889a8f..0f6af426 100644 --- a/src/GitReleaseManager.Core.Tests/VcsServiceTests.cs +++ b/src/GitReleaseManager.Core.Tests/VcsServiceTests.cs @@ -211,7 +211,7 @@ public async Task Should_Create_Labels() _vcsProvider.CreateLabelAsync(OWNER, REPOSITORY, Arg.Any