jenkinsci / gitlab-plugin

A Jenkins plugin for interfacing with GitLab
https://plugins.jenkins.io/gitlab-plugin/
GNU General Public License v2.0
1.44k stars 612 forks source link

Fixes the NPE in AbstractWebHookTriggerHandler.java #1615

Closed AniketNS closed 7 months ago

AniketNS commented 7 months ago

Fixes #1123 NPE error

I think the job.getProperty(GitLabConnectionProperty.class).getClient(); expression creates the NPE error. That's why I've checked the connectionProperty expression first.

krisstern commented 7 months ago

You can just correct the code in the same PR

AniketNS commented 7 months ago

You can just correct the code in the same PR

The necessary file changes PipelineHookTriggerHandlerImpl.java were already made. I just couldn't revert my code to my commits. Still learning about git commits. I've opened another PR. Please check that and tell me if you want me to make any changes.

krisstern commented 7 months ago

Hi @AniketNS, I think you could have add another commit to change that line? That seems the simplest option. You don't even need to rebase your PR that way.

AniketNS commented 7 months ago

Yeh I tried to do that but I don't know, something went wrong. But now I know where I was going wrong. Learned some interesting things about merging and commits. I'll try to keep all the PR tidy and organised from now on.