jenkinsci / jenkinsci/github-branch-source-plugin
[JENKINS-56468] githubPRComment throws NPE
- Dominant language
- Java
- Stars
- 217
- Forks
- 398
- Avg merge
- 30m
- Merged PRs (30d)
- 1
Description
the following stage generates NPE, even when built against a PR:
stage ('mobileproduct - Prebuild') {
githubPRComment comment: githubPRMessage('Build ${BUILD_NUMBER} ${BUILD_STATUS}')
}
the following NPE is generated:
java.lang.NullPointerException
at org.jenkinsci.plugins.github.pullrequest.utils.JobHelper.getGhRepositoryFromPRTrigger(JobHelper.java:161)
at org.jenkinsci.plugins.github.pullrequest.utils.JobHelper.getGhPullRequest(JobHelper.java:177)
at org.jenkinsci.plugins.github.pullrequest.publishers.impl.GitHubPRCommentPublisher.perform(GitHubPRCommentPublisher.java:73)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE
the checkout phase checks out multiple projects, even though I am not sure it's supposed to matter.
---
Originally reported by gilbahat, imported from: githubPRComment throws NPE
Raw content of original issue
the following stage generates NPE, even when built against a PR:
stage ('mobileproduct - Prebuild') {
githubPRComment comment: githubPRMessage('Build ${BUILD_NUMBER} ${BUILD_STATUS}')
}
the following NPE is generated:
java.lang.NullPointerException
at org.jenkinsci.plugins.github.pullrequest.utils.JobHelper.getGhRepositoryFromPRTrigger(JobHelper.java:161)
at org.jenkinsci.plugins.github.pullrequest.utils.JobHelper.getGhPullRequest(JobHelper.java:177)
at org.jenkinsci.plugins.github.pullrequest.publishers.impl.GitHubPRCommentPublisher.perform(GitHubPRCommentPublisher.java:73)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILUREthe checkout phase checks out multiple projects, even though I am not sure it's supposed to matter.
- environment:
Jenkins 2.150.3. branch source plugin 2.4.2
Contributor guide
Assessment
This issue has not been assessed yet.