ghprb icon indicating copy to clipboard operation
ghprb copied to clipboard

Comments do not trigger build as expected - as explained in the README

Open jimr6007 opened this issue 8 years ago • 23 comments

new PR or commit triggers build as expected but comments of any kind do nothing. I have tried every combination I can think of, experimented with the trigger phrase, nothing works.

Maybe I'm understanding it wrong. I thought that it was possible, with the correct config, for certain users, to be able to always trigger a build, no matter what... if it sees the appropriate comment, a build will be triggered, even if for the current PR, a build on the latest commit has already happened and succeeded.

Am I not understanding how that is supposed to work?

The plugin does add comments like "Can one of the admins..." etc but again, user added comments, admin or whitelisted or not, do nothing.

I'm running version 1.32.5

By the way, can you explain the difference between a whitelisted user and an admin user?

jimr6007 avatar Jun 15 '16 16:06 jimr6007

same here - i'm getting the following lines in my jenkins log:

Jun 15, 2016 12:23:01 PM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR Pull request #5 was updated on repo HPEbot/hello-world-plugin but there aren't any new comments nor commits; that may mean that commit status was updated.

HPEbot avatar Jun 16 '16 06:06 HPEbot

This worked for me until I recently updated versions. Likely a new bug was introduced.

gharcombe-minson avatar Jun 16 '16 19:06 gharcombe-minson

@gharcombe-minson what version did you upgrade from? I'd like to try going back to that version.

jimr6007 avatar Jun 16 '16 19:06 jimr6007

I'm noticing this as well on version 1.31.2, it was working a few weeks ago.

jameskeane avatar Jun 23 '16 16:06 jameskeane

Tested to day with 1.32.6, issue still occur.

zelonght avatar Jun 24 '16 08:06 zelonght

Can you please post your comment and your config from the job?

DavidTanner avatar Jun 27 '16 18:06 DavidTanner

I too am experiencing this issue after upgrading from 1.29.8 to 1.32.6. I'm happy to provide any specific info that would be helpful.

brewsteropsdev avatar Jun 28 '16 03:06 brewsteropsdev

@mbrewster, please post your config, and maybe a link to an example?

DavidTanner avatar Jun 28 '16 04:06 DavidTanner

Here's the config. Unfortunately I cant (easily) post an example as my Jenkins instance is set up for a private project. ghprb_config.txt

brewsteropsdev avatar Jun 28 '16 04:06 brewsteropsdev

re: "Can you please post your comment and your config from the job?"

  • My comment is report please
  • My config (I extract some of config here):
    • Trigger phrase: .*report\W+please.*
    • Skip build phrase: .*\[skip\W+ci\].*
    • Crontab line: H/3 * * * *
    • Allow members of whitelisted organizations as admins: yes
    • Build every pull request automatically without asking (Dangerous!): yes

Note that: it is triggered when new PR created and work correctly with that or when a commit is pushed to that PR. But only comment trigger is not working, so API/credential setting should be well set.

zelonght avatar Jun 30 '16 07:06 zelonght

I think I found the issue.

DavidTanner avatar Jun 30 '16 13:06 DavidTanner

Please Please check with 1.32.9

DavidTanner avatar Jun 30 '16 15:06 DavidTanner

@DavidTanner will do when it's available to download in Jenkins updates. Thanks!

zelonght avatar Jun 30 '16 16:06 zelonght

@DavidTanner running version 1.33.0, and I'm still seeing the issue.

crestenstclair avatar Aug 02 '16 21:08 crestenstclair

@DavidTanner I am running 1.33.3 and still seeing this issue. When polling is configured, the plugin can't detect a comment on a PR

vermasumeet1982 avatar Dec 07 '16 13:12 vermasumeet1982

@vermasumeet1982 I had to enable this option in Job Configuration "Build every pull request automatically without asking (Dangerous!): yes" on the latest version of this plugin to make it work.

Sserra90 avatar Jun 22 '17 18:06 Sserra90

@DavidTanner Hi I'm running ver. 1.39.0 and saw exactly the same issue. From logs the only relevants ones are "Pull request #x was updated on repo blahblah but there aren't any new comments nor commits; that may mean that commit status was updated." But I did make a comment on the PR containing my trigger phrase. Apparently the plugin didn't detect it. Could you please update us on the status on this bug? Or maybe there's some setup/config errors on my end? Thank you!

yuchaoran2011 avatar Dec 04 '17 23:12 yuchaoran2011

I'm still seeing it as well with 1.39.0 as well.

jhg03a avatar Jan 17 '18 01:01 jhg03a

This is still not working on 1.40.0 as well 😢

aldochristiaan avatar Mar 21 '18 07:03 aldochristiaan

Seeing the same issue on 1.40.0, it sometimes takes two comments in order for a build to actually kick off.

Logs:

Mar 27, 2018 5:41:40 PM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction handleAction
Checking issue comment '/jenkins merge' for repo BobLobLaw/Blog
Mar 27, 2018 5:41:40 PM INFO org.jenkinsci.plugins.ghprb.GhprbGitHubAuth checkSignature
Signatures checking OK
Mar 27, 2018 5:41:40 PM INFO org.jenkinsci.plugins.ghprb.GhprbGitHubAuth checkSignature
Signatures checking OK
Mar 27, 2018 5:41:40 PM INFO org.jenkinsci.plugins.ghprb.GhprbTrigger handleComment
Checking comment on PR #2,350 for job BobLobLaw/Blog Pull Request Builder Pipeline
Mar 27, 2018 5:41:40 PM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2,350 was updated/initialized on BobLobLaw/Blog at 3/27/18 5:41 PM by null (comment)
Mar 27, 2018 5:41:40 PM INFO org.jenkinsci.plugins.ghprb.GhprbTrigger handleComment
Checking comment on PR #2,350 for job BobLobLaw/Merge
Mar 27, 2018 5:41:40 PM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2,350 was updated/initialized on BobLobLaw/Blog at 3/27/18 5:41 PM by null (comment)
Mar 27, 2018 5:41:41 PM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2,350 was updated on repo BobLobLaw/Blog but there aren't any new comments nor commits; that may mean that commit status was updated.
Mar 27, 2018 5:41:41 PM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2,350 was updated on repo BobLobLaw/Blog but there aren't any new comments nor commits; that may mean that commit status was updated.
Mar 27, 2018 5:42:01 PM INFO org.eclipse.jetty.server.session.Session beginInvalidate
Session node010xhtc8crevl21iahqjxygttct2792037 already being invalidated

bboysca avatar Mar 27 '18 18:03 bboysca

see the same issue on 1.41.0

Checking PR #195 for xxx/yyy May 31, 2018 10:38:24 AM INFO org.jenkinsci.plugins.ghprb.GhprbTrigger handlePR Checking PR #195 for job analysis_pull_request May 31, 2018 10:38:24 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest Created Pull Request #195 on xxx/yyy by sonarqub () updated at: 5/31/18 10:38 AM SHA: 5bf5220ef2e640f49a68e059669cf0124e759c May 31, 2018 10:38:24 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR Pull request #195 was updated on repo xxx/yyy but there aren't any new comments nor commits; that may mean that commit status was updated.

caixinning avatar May 31 '18 02:05 caixinning

Got the same isssue on 1.42.1

Jun 30, 2020 3:06:56 PM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR Pull request xx was updated on repo xxx but there aren't any new comments nor commits; that may mean that commit status was updated. Jun 30, 2020 3:06:57 PM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest getPRCommitAuthor Unable to get PR commits: java.io.FileNotFoundException: xxx

tranvanthai avatar Jun 30 '20 08:06 tranvanthai

In case anyone else arrives here, the issue we faced was that dependabot had made a comment on the PR with a list of hidden commit messages. One of those messages had the phrase skip ci. I changed our "skip phrase" to be something like skip jenkins and now comment on the PR triggers ghprb correctly.

claptimes5 avatar Mar 24 '21 12:03 claptimes5