Skip to content

Duplicate comments showing up in pull request page #110

Open
@4sachi

Description

@4sachi

Jenkins and plugins versions report

I am using the pullRequest.comment("comment") method to add a comment on the GitHub PR page. From the Jenkins side I am only calling this method once during the build, but on the GitHub side it is adding same comment two times. I have added the output on the "Actual Results" section.

I have also printed the comment id from the Jenkins, and compared the comment id from the GitHub page. In all cases the second comment's id is showing in the Jenkins log, but no info is available about the first comment present in the GitHub side.

Environment
  Jenkins: 2.332.3
  OS: Linux - 5.10.112-108.499.amzn2.x86_64
  ---
  git:4.11.3
  git-client:3.11.0
  git-server:1.11
  github:1.34.3
  github-api:1.303-400.v35c2d8258028
  github-branch-source:1628.vb_2f51293cb_78
  pipeline-github:2.8-138.d766e30bb08b
  pipeline-github-lib:36.v4c01db_ca_ed16

What Operating System are you using (both controller, and any agents involved in the problem)?

Amazon Linux 2. No agents are involved. Running builds on the controller itself.

Reproduction steps

  1. Used the def comment = pullRequest.comment("comment") method to add the comment.

Expected Results

Only one comment should be added on the GitHub page when I used the pullRequest.comment method only once.

Actual Results

Two duplicate comments are added in the GitHub PR page. Please find below,

first comment

Terraform Initialization  success
Terraform Format and Style  success
Terraform Plan  success
Show Terraform Plan

second comment

Terraform Initialization  success
Terraform Format and Style  success
Terraform Plan  success
Show Terraform Plan

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions