Skip to content

Commit 95219a3

Browse files
committed
Merge branch 'hotfix/1.2.1' into develop
2 parents 4b6c267 + 1537681 commit 95219a3

File tree

10 files changed

+50
-69
lines changed

10 files changed

+50
-69
lines changed

.nuke/build.schema.json

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,17 @@
2626
"enum": [
2727
"AddGithubRelease",
2828
"Changelog",
29+
"Chore",
2930
"Clean",
3031
"Coldfix",
3132
"Compile",
3233
"Feature",
3334
"Format",
3435
"Hotfix",
35-
"IntegrationTests",
36-
"MutationTests",
3736
"Pack",
3837
"Publish",
3938
"Release",
40-
"ReportIntegrationTestCoverage",
41-
"ReportUnitTestCoverage",
42-
"Restore",
43-
"UnitTests"
39+
"Restore"
4440
]
4541
},
4642
"Verbosity": {
@@ -118,10 +114,9 @@
118114
"type": "boolean",
119115
"description": "Indicates if any changes should be stashed automatically prior to switching branch (Default : true)"
120116
},
121-
"CodecovToken": {
117+
"ChoreBranchPrefix": {
122118
"type": "string",
123-
"description": "The API key used to push code coverage to CodeCov",
124-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
119+
"description": "The name of the chore branch prefix"
125120
},
126121
"ConfigName": {
127122
"type": "string",
@@ -196,11 +191,6 @@
196191
"type": "string",
197192
"description": "Path to a solution file that is automatically loaded"
198193
},
199-
"StrykerDashboardApiKey": {
200-
"type": "string",
201-
"description": "API KEY used to submit mutation report to a stryker dashboard",
202-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
203-
},
204194
"Title": {
205195
"type": "string",
206196
"description": "Title that will be used when creating a PR"

.nuke/parameters.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "./build.schema.json",
33
"GitHubToken": "v1:r3dNxCHO7M3A8kirsxd3lKDWFxE0tYfmiTF4JfCYeLBSfiwvW2wm4lHEmsVUkueoAsk1HNLnavJHVWtlxTtkJJLZMJGTtnHHRlM0FpnvsrAupxPYRJWZDqgaGNO7+hAq",
4-
"NuGetApiKey": "v1:z7RveyZnVbRsGxFwVN2wEWAckFlLM/Vwb7BY9y42qpLD1nVfVbG5Q3ikRFZ9V/9W"
4+
"NuGetApiKey": "v1:z7RveyZnVbRsGxFwVN2wEWAckFlLM/Vwb7BY9y42qpLD1nVfVbG5Q3ikRFZ9V/9W",
5+
"DeleteLocalOnSuccess": "true"
56
}

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.2.1] / 2025-09-14
11+
### 🛠️ Fixes
12+
- Fixed incorrect source branch name when creating a `chore` branch ([#202](https://github.com/candoumbe/pipelines/issues/202))
13+
- Fixed the behavior of `chore` command when running from a `chore/*` branch : the command will now properly end the `chore` workflow.
14+
15+
### 🚀 New features
16+
- Added `IDoChoreWorkflow` to `IGitFlow` and `IGitHubFlow`: this enable the `chore` target on those workflows
17+
1018
## [1.2.0] / 2025-09-09
1119
### 🚀 New features
1220
- Added `IDoChoreWorkflow` component that can be used to work on a task using a `chore/*` branch.
@@ -17,9 +25,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1725
- Added various checks to ensure targets that depends on certain files to be present do not run when those files are not present.
1826
- Added support for `Microsoft.Testing.Platform` ([#198](https://github.com/candoumbe/Pipelines/issues/198))
1927

20-
### 🧹 Housekeeping
21-
22-
2328
## [1.0.1] / 2025-08-27
2429
### 🧹 Housekeeping
2530

@@ -291,7 +296,8 @@ So now `{MutationTestDirectory}/[{framework}]` is now changed to `{MutationTestD
291296
## [0.1.0] / 2022-10-23
292297
- Initial release
293298

294-
[Unreleased]: https://github.com/candoumbe/Pipelines/compare/1.2.0...HEAD
299+
[Unreleased]: https://github.com/candoumbe/Pipelines/compare/1.2.1...HEAD
300+
[1.2.1]: https://github.com/candoumbe/Pipelines/compare/1.2.0...1.2.1
295301
[1.2.0]: https://github.com/candoumbe/Pipelines/compare/1.1.0...1.2.0
296302
[1.1.0]: https://github.com/candoumbe/Pipelines/compare/1.0.1...1.1.0
297303
[1.0.1]: https://github.com/candoumbe/Pipelines/compare/1.0.0...1.0.1

build/Pipeline.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ public class Pipeline : EnhancedNukeBuild,
6262
IRestore,
6363
IDotnetFormat,
6464
ICompile,
65-
IUnitTest,
66-
IMutationTest,
67-
IIntegrationTest,
68-
IReportUnitTestCoverage,
69-
IReportIntegrationTestCoverage,
7065
IPushNugetPackages,
7166
ICreateGithubRelease,
7267
IGitFlowWithPullRequest
@@ -144,16 +139,4 @@ ValueTask IGitFlow.FinishRelease()
144139

145140
///<inheritdoc/>
146141
bool IDotnetFormat.VerifyNoChanges => IsLocalBuild;
147-
148-
/// <inheritdoc />
149-
IEnumerable<Project> IUnitTest.UnitTestsProjects => [];
150-
151-
/// <inheritdoc />
152-
IEnumerable<Project> IIntegrationTest.IntegrationTestsProjects => [];
153-
154-
/// <inheritdoc />
155-
IEnumerable<MutationProjectConfiguration> IMutationTest.MutationTestsProjects => [];
156-
157-
/// <inheritdoc />
158-
bool IReportCoverage.ReportToCodeCov => false;
159142
}

src/Candoumbe.Pipelines/Components/GitHub/IGitFlowWithPullRequest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,7 @@ static void OpenUrl(string url)
143143
}
144144
}
145145
}
146+
147+
/// <inheritdoc />
148+
async ValueTask IDoChoreWorkflow.FinishChore() => await FinishFeature();
146149
}

src/Candoumbe.Pipelines/Components/GitHub/IGitHubFlowWithPullRequest.cs

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ namespace Candoumbe.Pipelines.Components.GitHub
1818
/// <summary>
1919
/// This interface adds a target to open a pull request
2020
/// </summary>
21-
public interface IGitHubFlowWithPullRequest : IGitHubFlow, IHaveGitHubRepository
21+
public interface IGitHubFlowWithPullRequest : IGitHubFlow, IPullRequest
2222
{
2323
/// <summary>
2424
/// The title of the PR that will be created
2525
/// </summary>
2626
[Parameter("Title that will be used when creating a PR")]
27-
string Title => TryGetValue(() => Title) ?? ((GitRepository.IsOnFeatureBranch(), GitRepository.IsOnReleaseBranch(), GitRepository.IsOnHotfixBranch()) switch
27+
string IPullRequest.Title => TryGetValue(() => Title) ?? ((GitRepository.IsOnFeatureBranch(), GitRepository.IsOnReleaseBranch(), GitRepository.IsOnHotfixBranch()) switch
2828
{
2929
(true, _, _) => $"✨ {GitRepository.Branch?.Replace($"{FeatureBranchPrefix}/", string.Empty).ToTitleCase()}",
3030
(_, _, true) => $"🛠️ {GitRepository.Branch?.Replace($"{HotfixBranchPrefix}/", string.Empty).ToTitleCase()}",
@@ -42,25 +42,7 @@ public interface IGitHubFlowWithPullRequest : IGitHubFlow, IHaveGitHubRepository
4242
/// Description of the pull request
4343
/// </summary>
4444
[Parameter("Description of the pull request")]
45-
string Description => TryGetValue(() => Description) ?? this.As<IHaveChangeLog>()?.ReleaseNotes;
46-
47-
/// <summary>
48-
/// Should the local branch be deleted after the pull request was created successfully ?
49-
/// </summary>
50-
[Parameter("Should the local branch be deleted after the pull request was created successfully ?")]
51-
public bool DeleteLocalOnSuccess { get; }
52-
53-
/// <summary>
54-
/// Defines, when set to <see langword="true"/>, to open the pull request as draft.
55-
/// </summary>
56-
[Parameter("Indicates to open the pull request as 'draft'")]
57-
public bool Draft { get; }
58-
59-
/// <summary>
60-
/// The issue ID for witch pull request will be created.
61-
/// </summary>
62-
[Parameter("Issues that will be closed once the pull request is merged.")]
63-
uint[] Issues => TryGetValue(() => Issues) ?? [];
45+
string IPullRequest.Description => TryGetValue(() => Description) ?? this.As<IHaveChangeLog>()?.ReleaseNotes;
6446

6547
///<inheritdoc/>
6648
async ValueTask IDoFeatureWorkflow.FinishFeature()
@@ -183,5 +165,8 @@ static void OpenUrl(string url)
183165
}
184166
}
185167
}
168+
169+
/// <inheritdoc />
170+
async ValueTask IDoChoreWorkflow.FinishChore() => await FinishFeature();
186171
}
187172
}

src/Candoumbe.Pipelines/Components/GitHub/IPullRequest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ public interface IPullRequest : IHaveGitHubRepository
2121
string Description => TryGetValue(() => Description) ?? this.As<IHaveChangeLog>()?.ReleaseNotes;
2222

2323
/// <summary>
24-
/// Should the local branch be deleted after the pull request was created successfully ?
24+
/// Should the local branch be deleted after the pull request was created successfully?
2525
/// </summary>
2626
[Parameter("Should the local branch be deleted after the pull request was created successfully ?")]
27-
bool DeleteLocalOnSuccess => false;
27+
bool DeleteLocalOnSuccess => TryGetValue<bool?>(() => DeleteLocalOnSuccess) ?? false;
2828

2929
/// <summary>
3030
/// Defines, when set to <see langword="true"/>, to open the pull request as draft.
3131
/// </summary>
3232
[Parameter("Indicates to open the pull request as 'draft'")]
33-
bool Draft => false;
33+
bool Draft => TryGetValue<bool?>(() => Draft) ?? false;
3434

3535
/// <summary>
3636
/// The issue ID for witch pull request will be created.
3737
/// </summary>
3838
[Parameter("Issues that will be closed once the pull request is completed.")]
3939
uint[] Issues => TryGetValue(() => Issues) ?? [];
4040
}
41-
}
41+
}

src/Candoumbe.Pipelines/Components/Workflows/IDoChoreWorkflow.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Candoumbe.Pipelines.Components.Workflows;
1313
/// <remarks>
1414
/// This interface extends the <see cref="IWorkflow"/> interface and adds properties and methods specific to feature branch workflows.
1515
/// </remarks>
16-
public interface IDoChoreWorkflow : IDoFeatureWorkflow
16+
public interface IDoChoreWorkflow : IWorkflow
1717
{
1818
/// <summary>
1919
/// Gets the prefix used to name feature branches.
@@ -27,8 +27,7 @@ public interface IDoChoreWorkflow : IDoFeatureWorkflow
2727
/// <remarks>
2828
/// This property should never return <see langword="null"/>.
2929
/// </remarks>
30-
[Parameter("The name of the chore branch source")]
31-
string ChoreBranchSourceName => TryGetValue(() => ChoreBranchPrefix) ?? FeatureBranchSourceName;
30+
string ChoreBranchSourceName { get; }
3231

3332
/// <summary>
3433
/// Merges a chore branch back to <see cref="ChoreBranchSourceName"/>.

src/Candoumbe.Pipelines/Components/Workflows/IGitFlow.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ namespace Candoumbe.Pipelines.Components;
1010
/// Marks a build as supporting the <see href="https://datasift.github.io/gitflow/IntroducingGitFlow.html">git flow</see> workflow.
1111
/// </summary>
1212
/// <remarks>
13-
/// This interface will provide several ready to use targets to effectively manages this workflow even when the underlying "git" command does not support gitflow verbs.
13+
/// This interface will provide several ready-to-use targets to effectively manage this workflow even when the underlying "git" command does not support gitflow verbs.
1414
/// </remarks>
15-
public interface IGitFlow : IDoHotfixWorkflow, IDoColdfixWorkflow, IHaveDevelopBranch
15+
public interface IGitFlow : IDoHotfixWorkflow, IDoColdfixWorkflow, IDoChoreWorkflow, IHaveDevelopBranch
1616
{
1717
/// <summary>
1818
/// Name of the release branch
@@ -27,6 +27,9 @@ public interface IGitFlow : IDoHotfixWorkflow, IDoColdfixWorkflow, IHaveDevelopB
2727
///<inheritdoc/>
2828
string IDoFeatureWorkflow.FeatureBranchSourceName => DevelopBranchName;
2929

30+
/// <inheritdoc />
31+
string IDoChoreWorkflow.ChoreBranchSourceName => FeatureBranchSourceName;
32+
3033
///<inheritdoc/>
3134
string IDoHotfixWorkflow.HotfixBranchSourceName => MainBranchName;
3235

@@ -38,8 +41,10 @@ public interface IGitFlow : IDoHotfixWorkflow, IDoColdfixWorkflow, IHaveDevelopB
3841
/// </remarks>
3942
public Target Release => _ => _
4043
.DependsOn(Changelog)
41-
.Description($"Starts a new {ReleaseBranchPrefix}/{{version}} from {DevelopBranchName} if not currently on {ReleaseBranchPrefix}/{{version}}.\n" +
42-
$"When already on {ReleaseBranchPrefix}/{{version}}, merges back either to {MainBranchName} or {DevelopBranchName} ")
44+
.Description($$"""
45+
Starts a new {{ReleaseBranchPrefix}}/{version} from {{DevelopBranchName}} if not currently on {{ReleaseBranchPrefix}}/{version}.
46+
When already on {{ReleaseBranchPrefix}}/{version}, merges back either to {{MainBranchName}} or {{DevelopBranchName}} ")
47+
""")
4348
.Requires(() => IsLocalBuild)
4449
.Requires(() => !GitRepository.IsOnReleaseBranch() || GitHasCleanWorkingCopy())
4550
.Executes(async () =>
@@ -84,6 +89,7 @@ ValueTask IDoHotfixWorkflow.FinishHotfix()
8489
return ValueTask.CompletedTask;
8590
}
8691

92+
8793
/// <summary>
8894
/// Merges a release branch back to the trunk branch.
8995
/// </summary>
@@ -104,4 +110,9 @@ ValueTask IDoFeatureWorkflow.FinishFeature()
104110

105111
return ValueTask.CompletedTask;
106112
}
113+
114+
/// <summary>
115+
/// Merges the current feature branch back to <see cref="IHaveDevelopBranch.DevelopBranchName"/>.
116+
/// </summary>
117+
ValueTask IDoChoreWorkflow.FinishChore() => FinishFeature();
107118
}

src/Candoumbe.Pipelines/Components/Workflows/IGitHubFlow.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
/// <summary>
44
/// A lightweight version of <see cref="IGitFlow"/> where only a main branch exists.
55
/// </summary>
6-
public interface IGitHubFlow : IDoHotfixWorkflow, IDoFeatureWorkflow
6+
public interface IGitHubFlow : IDoHotfixWorkflow, IDoFeatureWorkflow, IDoChoreWorkflow
77
{
88
///<inheritdoc/>
99
string IDoFeatureWorkflow.FeatureBranchSourceName => MainBranchName;
1010

1111
///<inheritdoc/>
1212
string IDoHotfixWorkflow.HotfixBranchSourceName => MainBranchName;
13+
14+
/// <inheritdoc />
15+
string IDoChoreWorkflow.ChoreBranchSourceName => MainBranchName;
1316
}

0 commit comments

Comments
 (0)