Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21896

Configurable merge message

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Linux Ubuntu 3.2.0-58-generic x86_64
      Jenkins ver. 1.546
      Git Plugin 2.0
      Git server plugin 1.3
      Jenkins GIT client plugin 1.6.2
    • Similar Issues:

      Description

      I am using the "automatic merging" functionality as described here: "Using Git, Jenkins and pre-build branch merging" ( https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures ). The merging is working well. What I wanted is to have some readable information about which two branches are integratet within a commited merge result. The current comments look like:

      "Merge commit '6cb5a448d66ab30aca2257123e7c0396fa9fddac' into HEAD"

      I would be very useful if more informative commit/push comments could be written like:

      "Merged branch 'release/2.4.7' into branch 'develop'. Merge commit '6cb5a448d66ab30aca2257123e7c0396fa9f8dac' into HEAD"

      I have not found any customize functionality for this. And using the tag function for this would be an overhead, since "tons" of tags would be created.

      Regards

        Attachments

          Activity

          olibolib m r created issue -
          olibolib m r made changes -
          Field Original Value New Value
          Description I wanted to use the "automatic merging" functionality as described here: "Using Git, Jenkins and pre-build branch merging" ( https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures ). I configured my job a described with the integration branch (Branch to merge to) configured to "developAutoMerge" and leaved the 'branch' field in the Git SCM blank.

          When I "Build now" I get following exception:

          Fetching changes from the remote Git repository
          Fetching upstream changes from git@REPOSITORY.git
          Seen branch in repository origin/develop
          Seen branch in repository origin/developAutoMerge
          Seen branch in repository origin/feature/blabla
          [...]
          Seen branch in repository origin/master
          Seen branch in repository origin/release/2.6.1
          Seen branch in repository origin/release/2.6.2
          Seen 13 remote branches
          Multiple candidate revisions
          Scheduling another build to catch up with blaServerBuild_developAutoMerge
          Merging Revision 6474f8ef91822e58edc55aad707d2725ff5a8431 (origin/feature/blabla) onto /developAutoMerge using resolve strategy
          FATAL: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128:
          stdout: /developAutoMerge^{commit}

          stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions

          hudson.plugins.git.GitException: Command "git rev-parse /developAutoMerge^{commit}" returned status code 128:
          stdout: /developAutoMerge^{commit}

          stderr: fatal: ambiguous argument '/developAutoMerge^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions

          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1148)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1125)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1121)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:937)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:947)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:401)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:257)
          at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:62)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:795)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:862)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1415)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
          at hudson.model.Run.execute(Run.java:1678)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:231)

          I found a similar problem by googling: https://groups.google.com/forum/#!topic/jenkinsci-dev/ek4hYR-z08k
          The proposed solution there was downgrading the Jenkins Git plugin from 2.0 to 1.4.0.
          I am using the "automatic merging" functionality as described here: "Using Git, Jenkins and pre-build branch merging" ( https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures ). The merging is working well. What I wanted is to have some readable information about which two branches are integratet within a commited merge result. The current comments look like:

          "Merge commit '6cb5a448d66ab30aca2257123e7c0396fa9fddac' into HEAD"

          I would be very useful if more informative commit/push comments could be written like:

          "Merged branch 'release/2.4.7' into branch 'develop'. Merge commit '6cb5a448d66ab30aca2257123e7c0396fa9f8dac' into HEAD"

          I have not found any customize functionality for this. And using the tag function for this would be an overhead, since "tons" of tags would be created.

          Regards
          Environment Linux Ubuntu 3.2.0-58-generic x86_64
          Jenkins ver. 1.546
          Git Plugin 2.0 (also with 2.0.1 not working)
          Git server plugin 1.3
          Jenkins GIT client plugin 1.6.2
          Linux Ubuntu 3.2.0-58-generic x86_64
          Jenkins ver. 1.546
          Git Plugin 2.0
          Git server plugin 1.3
          Jenkins GIT client plugin 1.6.2
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          Labels exception git plugin git plugin publisher
          Priority Major [ 3 ] Minor [ 4 ]
          integer Kanstantsin Shautsou made changes -
          Summary How to customize commit comments for the push of merging results Configurable merge message
          integer Kanstantsin Shautsou made changes -
          Labels git plugin publisher git-publisher
          Hide
          mikenicholson Mike Nicholson added a comment -

          Our team has run into this same issue. When merging manually we use branch names so the merge message is automatically populated as

          "Merge <feature-branch> into develop"

          The feature branch name is very useful in large projects since it provides significant context around what was merged. We would be happy with either a customized message where we could insert our own message or if the default merge message was changed to use branch names.

          Show
          mikenicholson Mike Nicholson added a comment - Our team has run into this same issue. When merging manually we use branch names so the merge message is automatically populated as "Merge <feature-branch> into develop" The feature branch name is very useful in large projects since it provides significant context around what was merged. We would be happy with either a customized message where we could insert our own message or if the default merge message was changed to use branch names.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 153897 ] JNJira + In-Review [ 178643 ]
          Hide
          dhartrampf Dennis Hartrampf added a comment -

          We have the same problem here. I totally agree with Mike Nicholson
          It would be of a great benefit to us.

          Show
          dhartrampf Dennis Hartrampf added a comment - We have the same problem here. I totally agree with Mike Nicholson It would be of a great benefit to us.
          dhartrampf Dennis Hartrampf made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Hide
          robertberta Robert Berta added a comment -

          Please solve this , I like Mike Nicholson suggestion.

          Show
          robertberta Robert Berta added a comment - Please solve this , I like Mike Nicholson suggestion.
          ndeloof Nicolas De Loof made changes -
          Assignee Nicolas De Loof [ ndeloof ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            olibolib m r
            Votes:
            10 Vote for this issue
            Watchers:
            11 Start watching this issue

              Dates

              Created:
              Updated: