{"action":"opened","issue":{"url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/295","repository_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin","labels_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/295/comments","events_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/295/events","html_url":"https://github.com/jenkinsci/gitlab-plugin/issues/295","id":153021496,"number":295,"title":"NullPointerException during the build of a merge request","user":{"login":"champidead","id":4362224,"avatar_url":"https://avatars.githubusercontent.com/u/4362224?v=3","gravatar_id":"","url":"https://api.github.com/users/champidead","html_url":"https://github.com/champidead","followers_url":"https://api.github.com/users/champidead/followers","following_url":"https://api.github.com/users/champidead/following{/other_user}","gists_url":"https://api.github.com/users/champidead/gists{/gist_id}","starred_url":"https://api.github.com/users/champidead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/champidead/subscriptions","organizations_url":"https://api.github.com/users/champidead/orgs","repos_url":"https://api.github.com/users/champidead/repos","events_url":"https://api.github.com/users/champidead/events{/privacy}","received_events_url":"https://api.github.com/users/champidead/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-04T14:10:06Z","updated_at":"2016-05-04T14:10:06Z","closed_at":null,"body":"Hi,\r\n\r\nI'm trying to get Jenkins building the source branch merged with the target branch of a Merge Request. Hence, I followed [these instructions](https://github.com/jenkinsci/gitlab-plugin#jenkins-job-configuration), including the _Additional Behaviours_ step.\r\n\r\nWhen a Merge Request is created in GitLab, Jenkins runs the build as expected but then a NullPointerException is triggered:\r\n\r\n```\r\nMerging Revision 73bf4ee77234767a99467a60af19d700db98ad94 (origin/feature/something) to origin/develop, UserMergeOptions{mergeRemote='origin', mergeTarget='${gitlabTargetBranch}', mergeStrategy='default', fastForwardMode='--ff'}\r\n > git rev-parse origin/develop^{commit} # timeout=10\r\n > git config core.sparsecheckout # timeout=10\r\n > git checkout -f origin/develop\r\n > git merge --ff 73bf4ee77234767a99467a60af19d700db98ad94 # timeout=10\r\n > git config core.sparsecheckout # timeout=10\r\n > git checkout -f 73bf4ee77234767a99467a60af19d700db98ad94\r\nFATAL: null\r\njava.lang.NullPointerException\r\n\tat hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:88)\r\n\tat hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1009)\r\n\tat hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098)\r\n\tat hudson.scm.SCM.checkout(SCM.java:485)\r\n\tat hudson.model.AbstractProject.checkout(AbstractProject.java:1269)\r\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)\r\n\tat jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)\r\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)\r\n\tat hudson.model.Run.execute(Run.java:1738)\r\n\tat hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)\r\n\tat hudson.model.ResourceController.execute(ResourceController.java:98)\r\n\tat hudson.model.Executor.run(Executor.java:410)\r\nFinished: FAILURE\r\n```\r\nDo you have any idea about this?\r\n\r\nVersions used:\r\n- Jenkins 2.1\r\n- GitLab 1.2.2\r\n- GitLab 8.7.1\r\n\r\nThanks :)"}}