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

ghprbCommentBody contains stale values

    XMLWordPrintable

    Details

    • Similar Issues:

      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;`.
            Hide
            sag47 Sam Gleske added a comment - - edited
            Show
            sag47 Sam Gleske added a comment - - edited Proposed PR https://github.com/jenkinsci/ghprb-plugin/pull/504 This duplicates GitHub issue:  https://github.com/jenkinsci/ghprb-plugin/issues/233
            Hide
            sag47 Sam Gleske added a comment -

            Closing as duplicate of GitHub issue.

            Show
            sag47 Sam Gleske added a comment - Closing as duplicate of GitHub issue.
            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 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Dominic Hargreaves
            Path:
            src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequest.java
            http://jenkins-ci.org/commit/ghprb-plugin/753a77fc1eecf803e6218888fa746b62dedea9e4
            Log:
            Fix for stale ghprbCommentBody values (#233/JENKINS-40802)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dominic Hargreaves Path: src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequest.java http://jenkins-ci.org/commit/ghprb-plugin/753a77fc1eecf803e6218888fa746b62dedea9e4 Log: Fix for stale ghprbCommentBody values (#233/ JENKINS-40802 )
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Sam Gleske
            Path:
            src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequest.java
            http://jenkins-ci.org/commit/ghprb-plugin/c943b3038b98f73b183b527d6ae3da7d58667e6e
            Log:
            Merge pull request #504 from jmdh/fix-stale-comment-body

            Fix for stale ghprbCommentBody values (#233/JENKINS-40802)

            Compare: https://github.com/jenkinsci/ghprb-plugin/compare/80c0765af51b...c943b3038b98

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Gleske Path: src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequest.java http://jenkins-ci.org/commit/ghprb-plugin/c943b3038b98f73b183b527d6ae3da7d58667e6e Log: Merge pull request #504 from jmdh/fix-stale-comment-body Fix for stale ghprbCommentBody values (#233/ JENKINS-40802 ) Compare: https://github.com/jenkinsci/ghprb-plugin/compare/80c0765af51b...c943b3038b98

              People

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

                Dates

                Created:
                Updated:
                Resolved: