Skip to content

Conversation

peetkes
Copy link

@peetkes peetkes commented Jun 30, 2023

…Test for GitReleasePluginTests

…failing unitTest for GitReleasePluginTests
then:
newestCommit.contains("Signed-off-by: Unit Test <unit@test>")
// newestCommit.contains("Signed-off-by: Unit Test <unit@test>")
newestCommit.contains("[Gradle Release Plugin] - new version commit: '1.1'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This renders the test useless. The point is, that it tests whether the -s is given to Git and thus the Signed-off-by line added.
Here this also works just fine.

Comment on lines +211 to +214
preCommitText = '[Gradle Release Plugin]'
preTagCommitMessage = 'pre tag commit: '
tagCommitMessage = 'creating tag: '
newVersionCommitMessage = 'new version commit: '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good idea.
This changes the result for everyone setting the preCommitText already which is a text that should be prepended additionally to the other configured messages.

String message = extension.preTagCommitMessage.get() + " '${tagName()}'."
if (extension.preCommitText) {
message = "${extension.preCommitText.get()} ${message}"
if (extension.preCommitText.get()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only line in the PR that I would second, as it also is the same I did in #384 not seeing this PR. :-D

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which was merged just now, so my recommendation would be to close this PR unmerged. :-)

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.

2 participants