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

SCM Changelog: Commits, made via github, displayed with "noreply" user

      Steps:

      1. Create Pipeline job for any project on github.
        node {
           def mvnHome
           stage('Preparation') { 
              git 'https://github.com/user-github/project.git'           
              mvnHome = tool 'M3'
           }
           stage('Build') {
              if (isUnix()) {
                 sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
              } else {
                 bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)
              }
           stage('Results') {
              junit '**/target/surefire-reports/TEST-*.xml'
              archive 'target/*.jar'
           }
        }
        
      2. Open this project on github.
      3. Edit any files via the web interface. Commit.
      4. Run this job.
      5. Check Recent Changes:
        Expected Result: Recent changes have been made the correct user from github.
        Actual Result: Recent changes have been made the "noreply" user.
        Correct git log:
        commit 497fb99ae5c481f72ea34fa2e190afa908660798
        Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
        Date:   Tue Oct 4 14:46:24 2016 +0200
        
            Update Jenkinsfile
        
        commit bbf860b9a6c7a28208b717d42e6f8665b21063a8
        Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
        Date:   Tue Oct 4 14:18:41 2016 +0200
        
            Update Jenkinsfile
        
        commit 7312064526032f050b04335b4676b27b48a698f0
        Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
        Date:   Tue Oct 4 13:56:31 2016 +0200
        
            Update Jenkinsfile
        

      Please see the attached screenshots.

        1. GitHub-Org-Folders.png
          GitHub-Org-Folders.png
          52 kB
        2. Pipeline-Multi-Branch.png
          Pipeline-Multi-Branch.png
          78 kB
        3. Changes in Blue Ocean.png
          Changes in Blue Ocean.png
          37 kB
        4. Changes.png
          Changes.png
          127 kB

          [JENKINS-38698] SCM Changelog: Commits, made via github, displayed with "noreply" user

          Kseniia Nenasheva created issue -
          Kseniia Nenasheva made changes -
          Description Original: +Steps:+
          # Create Pipeline job for any project on github.
          # Open this project on github.
          # Edit any files via the web interface. Commit.
          # Run this job.
          # Check Recent Changes:
          *Expected Result:* Recent changes have been made the user from github.
          *Actual Result:* Recent changes have been made the "noreply" user.
          # Correct git log:
          {noformat}
          commit 497fb99ae5c481f72ea34fa2e190afa908660798
          Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
          Date: Tue Oct 4 14:46:24 2016 +0200

              Update Jenkinsfile

          commit bbf860b9a6c7a28208b717d42e6f8665b21063a8
          Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
          Date: Tue Oct 4 14:18:41 2016 +0200

              Update Jenkinsfile

          commit 7312064526032f050b04335b4676b27b48a698f0
          Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
          Date: Tue Oct 4 13:56:31 2016 +0200

              Update Jenkinsfile
          {noformat}

          Please see the attached screenshots.
          New: +Steps:+
          # Create Pipeline job for any project on github.
          {code}
          node {
             def mvnHome
             stage('Preparation') {
                git 'https://github.com/user-github/project.git&#39;
                mvnHome = tool 'M3'
             }
             stage('Build') {
                if (isUnix()) {
                   sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
                } else {
                   bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)
                }
             stage('Results') {
                junit '**/target/surefire-reports/TEST-*.xml'
                archive 'target/*.jar'
             }
          }
          {code}
          # Open this project on github.
          # Edit any files via the web interface. Commit.
          # Run this job.
          # Check Recent Changes:
          *Expected Result:* Recent changes have been made the correct user from github.
          *Actual Result:* Recent changes have been made the "noreply" user.
          Correct git log:
          {noformat}
          commit 497fb99ae5c481f72ea34fa2e190afa908660798
          Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
          Date: Tue Oct 4 14:46:24 2016 +0200

              Update Jenkinsfile

          commit bbf860b9a6c7a28208b717d42e6f8665b21063a8
          Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
          Date: Tue Oct 4 14:18:41 2016 +0200

              Update Jenkinsfile

          commit 7312064526032f050b04335b4676b27b48a698f0
          Author: ksenia-nenasheva <ks.nenasheva@gmail.com>
          Date: Tue Oct 4 13:56:31 2016 +0200

              Update Jenkinsfile
          {noformat}

          Please see the attached screenshots.
          Kseniia Nenasheva made changes -
          Summary Original: Commits, made via github, displayed with "noreply" user New: SCM Changelog: Commits, made via github, displayed with "noreply" user
          Kseniia Nenasheva made changes -
          Labels Original: changes github pipeline New: changes git github pipeline
          Kseniia Nenasheva made changes -
          Component/s New: git-plugin [ 15543 ]
          Kseniia Nenasheva made changes -
          Assignee New: Mark Waite [ markewaite ]

          Mark Waite added a comment -

          There is a setting in the git plugin which will change from showing the committer (likely the noreply in this case) to showing the author. The job definition likely is configured to the default which is to show the committer.

          Mark Waite added a comment - There is a setting in the git plugin which will change from showing the committer (likely the noreply in this case) to showing the author. The job definition likely is configured to the default which is to show the committer.
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]

          Thanks markewaite, it's works. I had to replace git step in my pipeline, by the generic checkout step.
          IMHO, it would be great to have this behavior by default.

          Kseniia Nenasheva added a comment - Thanks markewaite , it's works. I had to replace git step in my pipeline, by the generic checkout step. IMHO, it would be great to have this behavior by default.

          Mark Waite added a comment -

          Unfortunately, I'm unwilling to change the default behavior because that would change the default behavior for the 80 000+ installations of the git plugin. Some portion of those installations are predictably dependent on the (strange) default behavior of showing the committer name rather than the author name.

          It was considered to change that default behavior as part of the switch from git plugin 1 to git plugin 2, but then was decided to instead retain compatibility. I kept with that same decision in the switch from git plugin 2 to git plugin 3.

          Mark Waite added a comment - Unfortunately, I'm unwilling to change the default behavior because that would change the default behavior for the 80 000+ installations of the git plugin. Some portion of those installations are predictably dependent on the (strange) default behavior of showing the committer name rather than the author name. It was considered to change that default behavior as part of the switch from git plugin 1 to git plugin 2, but then was decided to instead retain compatibility. I kept with that same decision in the switch from git plugin 2 to git plugin 3.
          Mark Waite made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            ks_nenasheva Kseniia Nenasheva
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: