github-integration-plugin
github-integration-plugin copied to clipboard
WorkFlow: PRs being triggered by everything(?)
I recently updated to 0.1.0-rc23.
Now PRs are getting triggered too often. They're being triggered by reviews being requested and seemingly by any comment, even ones that do not match what i have set up in the Jenkins job.
As an example this is from this morning. The jenkins log shows:
Received PULL_REQUEST for https://github.com/RusticiSoftware/ScormEngine from 192.30.252.40 ⇒ https://leeroy.rusticisoftware.com:45808/jenkins/github-webhook/
May 11, 2017 12:16:03 PM INFO org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger readyToBuildCauses
GitHub rate limit after check GitHubRepositoryName[host=github.com,username=RusticiSoftware,repository=ScormEngine]: GHRateLimit{remaining=4983, limit=5000, resetDate=Thu May 11 13:15:56 UTC 2017}, consumed: 13, checked PRs: 1
May 11, 2017 12:16:03 PM INFO org.jenkinsci.plugins.github.pullrequest.trigger.JobRunnerForCause apply
Jenkins queued the run (PR opened)
The action on the payload in the webhook says:
"action": "edited"
What i did was edited the main description/comment on the PR. The comment in no way matched any rules i have set up either. I get the same thing happen for
"action": "review_requested",
also.
Please show config.xml of your job and polling log from build that was run
Never mind. Can't recreate it now. If it happens again i'll remember to get those for you. Until then i'll just close this 👍 Sorry
github-pullrequest-polling.log.txt config.xml.txt
Recreated....
config.xml and github-pullrequest-polling.log attached. 2 things happened on this PR, a comment was added (doesn't seem to match rules) and a review was approved. Due to updating (or lack of) the page on GH neither user can be sure whether it was the comment or the review that initiated the Jenkins build.
So what exactly wrong? Comment match?
<events>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<comment>test again</comment>
</org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<comment>test this</comment>
</org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<comment>retest this please</comment>
</org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<comment>test this ([A-Za-z0-9 ,!]+)</comment>
</org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommentEvent>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommitEvent/>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPROpenEvent/>
</events>
Am i being dumb? What is it matching? All the comment regexes have 'test' in them and i can't see that in the comment.
If you navigate to "GitHub Pull Requests" page and press "Run GH PR trigger" will it schedule builds again?
It scheduled a whole bunch of them, yeah.
So now trigger every time see changes and trigger builds?
Sorry, i don't know what that means.
Because clicking that button went through and started a bunch of tests i added a comment to the affected existing PRs that read
Ignore the yellow below. By-product of trying to work through this github-jenkins comment issue with the plugin owner
Each time i added that comment the build was triggered again.
The very first line or the output says:
GitHub PR #<a href="https://github.com/REDACTED/pull/2433">2433</a>, PR opened
So something is evaluating that the PR has been opened. It was already opened, i just added a comment (that didn't match any of the regexes)
When you navigate to "GitHub PR" page does it have list of all PRs? Do you have any errors in jenkins system logger?
Is it private repo?
No errors in the logs. Yeah, it's a private repo i'm afraid.
Is it possible to make one private repo and provide admin access to it for @Kostyasha-auto? I had some complains about private repos, but i can't test them.
I don't think that is really feasible i'm afraid.
I think i know where i can get private repo, will try.
When you navigate to "GitHub PR" page does it have list of all PRs?
#203 sounds the same...
Now i see that workflow job has bugs.
I think i found #281 Strange that this was found only now.