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

A changelog should be recorded for the first build of a PR

      The git plugin by design doesn't record a changelog for the first build of a job.

      I guess that is expected/ok for the first build of a branch where no previous build history is known and we don't want to pollute the build with all the history that has come before the job was configured.

      But that is not as expected for the first build of a GitHub PR where the commit list is somewhat short and should be known.

       

      For example the Gerrit Trigger has a `BuildChooser` that computes the changelog for the patch set that is being built. It is a bit simpler in that case because it will always be only one commit. But something similar should be done for GitHub PRs.

          [JENKINS-46086] A changelog should be recorded for the first build of a PR

          rsandell added a comment -

          There is an extension called ChangelogToBranch in GitSCM that might be usable as well.

          rsandell added a comment - There is an extension called ChangelogToBranch in GitSCM that might be usable as well.

          Zhenlei Huang added a comment - - edited

          There is a similar issue JENKINS-25508, it may be related.

          Zhenlei Huang added a comment - - edited There is a similar issue  JENKINS-25508 , it may be related.

          rsandell added a comment -

          Well, yes JENKINS-25508 is similar, but not really the same. I don't see it as a bug that the git plugin by default doesn't record the changelog for the first build, because I for example wouldn't want the changelog for the first build of the master branch of a nine years old project, that would be horrible.

          But for pull requests it's a bit of a different story, at least in the multi branch sense, since we know where the branching point is, we could just list the commits that are in the PR at the time of the first build, with some caveats for example when someone does a rebase.

           

          rsandell added a comment - Well, yes  JENKINS-25508  is similar, but not really the same. I don't see it as a bug that the git plugin by default doesn't record the changelog for the first build, because I for example wouldn't want the changelog for the first build of the master branch of a nine years old project, that would be horrible. But for pull requests it's a bit of a different story, at least in the multi branch sense, since we know where the branching point is, we could just list the commits that are in the PR at the time of the first build, with some caveats for example when someone does a rebase.  

          Jacob Hayes added a comment -

          This issue was marked as resolved/fixed, but I don't see any changes and the duplicated ticket is still open. I also didn't see any relevant changes in the plugin on Github. If it is fixed, how can I get the changelog for the first PR build? Right now, the changeset when condition isn't very helpful and can marks PRs as passing when nothing has been tested.

          Jacob Hayes added a comment - This issue was marked as resolved/fixed, but I don't see any changes and the duplicated ticket is still open. I also didn't see any relevant changes in the plugin on Github. If it is fixed, how can I get the changelog for the first PR build? Right now, the changeset when condition isn't very helpful and can marks PRs as passing when nothing has been tested.

          Chen Fliesher added a comment -

          This issue is still relevant even if more than 1 year had passed.

          For example, this is the dump for a changelog for the 1st PR

          ChangeSets
          17:49:01 <java.util.LinkedList@20 size=1 first=java.util.LinkedList$Node@201a254b last=java.util.LinkedList$Node@201a254b modCount=1>
          The first ChangeSets
          17:49:01 <java.util.ArrayList@1 elementData=[] size=0 modCount=0>,

          I think there should be a way to follow the branch on the Pull Request, this example if from Github repository

          Chen Fliesher added a comment - This issue is still relevant even if more than 1 year had passed. For example, this is the dump for a changelog for the 1st PR ChangeSets 17:49:01 <java.util.LinkedList@20 size=1 first=java.util.LinkedList$Node@201a254b last=java.util.LinkedList$Node@201a254b modCount=1> The first ChangeSets 17:49:01 <java.util.ArrayList@1 elementData=[] size=0 modCount=0>, I think there should be a way to follow the branch on the Pull Request, this example if from Github repository

          rsandell I believe this should not be fixed ?

          Allan BURDAJEWICZ added a comment - rsandell I believe this should not be fixed ?

          (The issue was closed as Resolved/Fixed, which based on my understanding was slightly misleading − it’s closed as duplicate of JENKINS-44849. Hopefully this is now clearer )

          Jean-Frédéric added a comment - (The issue was closed as Resolved/Fixed, which based on my understanding was slightly misleading − it’s closed as duplicate of JENKINS-44849 . Hopefully this is now clearer )

            Unassigned Unassigned
            rsandell rsandell
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: