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

ghprbCommentBody contains stale values

    XMLWordPrintable

Details

    Description

      If I have a Jenkins job with 'Trigger phrase' set to 'redo', then when I type 'redo' on the PR a Jenkins job is correctly triggered with 'ghprbCommentBody' set to 'redo'.

      However, if I then push another commit to this PR, then a Jenkins job is created with 'ghprbCommentBody' again set to 'redo', rather than 'null'.

      It looks like at the same time as setting `int commentsChecked = 0;` at GhprbPullRequest.java:245 we should also set `commentBody = null;`.

      Attachments

        Issue Links

          Activity

            ian_semmle Ian Lynagh created issue -
            ian_semmle Ian Lynagh made changes -
            Field Original Value New Value
            Description If I have a Jenkins job with 'Trigger phrase' set to 'redo', then when I type 'redo' on the PR a Jenkins job is correctly triggered with 'ghprbCommentBody' set to 'redo'.

            However, if I then push another commit to this PR, then a Jenkins job is created with 'ghprbCommentBody' again set to 'redo', rather than 'null'.

            I'm afraid not able to easily test this at the moment, but from a quick look at the code, it looks like at the same time as setting `int commentsChecked = 0;` at GhprbPullRequest.java:245 we should also set `commentBody = null;`.
            If I have a Jenkins job with 'Trigger phrase' set to 'redo', then when I type 'redo' on the PR a Jenkins job is correctly triggered with 'ghprbCommentBody' set to 'redo'.

            However, if I then push another commit to this PR, then a Jenkins job is created with 'ghprbCommentBody' again set to 'redo', rather than 'null'.

            I'm afraid I'm not able to easily test this at the moment, but from a quick look at the code, it looks like at the same time as setting `int commentsChecked = 0;` at GhprbPullRequest.java:245 we should also set `commentBody = null;`.
            ian_semmle Ian Lynagh made changes -
            Description If I have a Jenkins job with 'Trigger phrase' set to 'redo', then when I type 'redo' on the PR a Jenkins job is correctly triggered with 'ghprbCommentBody' set to 'redo'.

            However, if I then push another commit to this PR, then a Jenkins job is created with 'ghprbCommentBody' again set to 'redo', rather than 'null'.

            I'm afraid I'm not able to easily test this at the moment, but from a quick look at the code, it looks like at the same time as setting `int commentsChecked = 0;` at GhprbPullRequest.java:245 we should also set `commentBody = null;`.
            If I have a Jenkins job with 'Trigger phrase' set to 'redo', then when I type 'redo' on the PR a Jenkins job is correctly triggered with 'ghprbCommentBody' set to 'redo'.

            However, if I then push another commit to this PR, then a Jenkins job is created with 'ghprbCommentBody' again set to 'redo', rather than 'null'.

            It looks like at the same time as setting `int commentsChecked = 0;` at GhprbPullRequest.java:245 we should also set `commentBody = null;`.
            sag47 Sam Gleske made changes -
            Assignee ben patterson [ bpatterson ] Sam Gleske [ sag47 ]
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Closed [ 6 ]
            sag47 Sam Gleske made changes -
            Remote Link This issue links to "PR 233 (Web Link)" [ 19972 ]
            sag47 Sam Gleske made changes -
            Remote Link This issue links to "PR 233 (Web Link)" [ 19972 ]
            sag47 Sam Gleske made changes -
            Remote Link This issue links to "GitHub issue 233 (Web Link)" [ 19973 ]

            People

              sag47 Sam Gleske
              ian_semmle Ian Lynagh
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: