Skip to content

Commit da562a0

Browse files
committed
Allow to use different commit message on feature squash - closes #287
1 parent 6329fe2 commit da562a0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureFinishMojo.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ public class GitFlowFeatureFinishMojo extends AbstractGitFlowMojo {
107107
@Parameter(property = "incrementVersionAtFinish", defaultValue = "false")
108108
private boolean incrementVersionAtFinish;
109109

110+
/**
111+
* Commit message to use after squash. Has effect only if {@link #featureSquash}
112+
* parameter is set to <code>true</code>.
113+
*
114+
*/
115+
@Parameter(property = "featureSquashMessage")
116+
private String featureSquashMessage;
117+
110118
/** {@inheritDoc} */
111119
@Override
112120
public void execute() throws MojoExecutionException, MojoFailureException {
@@ -201,7 +209,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
201209
if (featureSquash) {
202210
// git merge --squash feature/...
203211
gitMergeSquash(featureBranchName);
204-
gitCommit(featureBranchName);
212+
gitCommit(StringUtils.isBlank(featureSquashMessage) ? featureBranchName : featureSquashMessage);
205213
} else {
206214
Map<String, String> properties = new HashMap<String, String>();
207215
properties.put("version", version);

0 commit comments

Comments
 (0)