mooltiverse / nyx

The one stop semantic release tool
https://github.com/mooltiverse/nyx
Apache License 2.0
116 stars 8 forks source link

Problem with MergeCommit implementation #271

Closed lxke19 closed 1 year ago

lxke19 commented 1 year ago

Hey @flelli ,

we really apreciate your help with the merge commits. But it still doesn't work for us. We tried it with the extended preset: " override fun apply(project: Project) { project.pluginManager.apply(NyxPlugin::class.java) project.extensions.configure(NyxExtension::class.java) { nyxExtension -> nyxExtension.preset.set("extended") // This commitMessageConvention, configures nyx to support merge commits instead of rebase and fast-forward merges nyxExtension.commitMessageConventions.enabled.set( listOf( "conventionalCommitsForMerge" ) ) nyxExtension.dryRun.set(false) nyxExtension.releaseLenient.set(true) ... " as well as with the simple preset: " nyxExtension.commitMessageConventions { convention -> convention.items { item -> item.create("mergeCommitConvention") { mergeCommitConvention -> mergeCommitConvention.expression.set("""(?[a-zA-Z0-9]+)(!)?((?[a-z ]+))?:( (?.+))""") val commitMessageExpressions = mapOf( "major" to """(?s)(?m)[a-zA-Z0-9</em>]+(!: .<em>|.</em>^(BREAKING( |-)CHANGE: )).<em>""", "minor" to """(?s)(?m)feat(!{0})(([a-z ]+))?: (?!.</em>^(BREAKING( |-)CHANGE: )).<em>""", "patch" to """(?s)(?m)fix(!{0})(([a-z ]+))?: (?!.</em>^(BREAKING( |-)CHANGE: )).*""" ) mergeCommitConvention.bumpExpressions.set(commitMessageExpressions) } } } " What could be our Problem we enabled it as you said. Or did I missunderstand something?</p> <p>Thanks in advance,</p> <p>Luke</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/flelli"><img src="https://avatars.githubusercontent.com/u/23358646?v=4" />flelli</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Can you give me an example repo pr commit message and debug log message?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/lxke19"><img src="https://avatars.githubusercontent.com/u/132147138?v=4" />lxke19</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Ah we now understand, how you're trying to solve this problem with merge commits. Unfortunately this solution doesn't work for us. We use Gitea and in it's merge commits there is no way to include the commit messages of al the commits in the branch. As we understand it, you are trying to get the version number from the merge commit itself, but the first parent rule remains. But that doesn't work for us. If you plan to revisit the merge commits issue so that nyx follows both parents and uses logic to infer the version, please let us know. Nevertheless, a big thank you for your efforts.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/flelli"><img src="https://avatars.githubusercontent.com/u/23358646?v=4" />flelli</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Ok, so this is related to <a href="https://github.com/mooltiverse/nyx/issues/270">https://github.com/mooltiverse/nyx/issues/270</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/flelli"><img src="https://avatars.githubusercontent.com/u/23358646?v=4" />flelli</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I'm closing this issue as it's merged to <a href="https://github.com/mooltiverse/nyx/issues/270">https://github.com/mooltiverse/nyx/issues/270</a></p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>