{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/340","repository_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin","labels_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/340/comments","events_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/340/events","html_url":"https://github.com/jenkinsci/gitlab-plugin/issues/340","id":157400198,"number":340,"title":"Push to master or webhook trigger rebuilds only the latest MR","user":{"login":"telisior","id":14308110,"avatar_url":"https://avatars.githubusercontent.com/u/14308110?v=3","gravatar_id":"","url":"https://api.github.com/users/telisior","html_url":"https://github.com/telisior","followers_url":"https://api.github.com/users/telisior/followers","following_url":"https://api.github.com/users/telisior/following{/other_user}","gists_url":"https://api.github.com/users/telisior/gists{/gist_id}","starred_url":"https://api.github.com/users/telisior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telisior/subscriptions","organizations_url":"https://api.github.com/users/telisior/orgs","repos_url":"https://api.github.com/users/telisior/repos","events_url":"https://api.github.com/users/telisior/events{/privacy}","received_events_url":"https://api.github.com/users/telisior/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-29T18:59:19Z","updated_at":"2016-06-14T19:57:11Z","closed_at":null,"body":"Hello.\r\nI'm using\r\n* Jenkins v2.6\r\n* Gitlab v8.8.1\r\n* Plugin v1.2.3\r\n\r\nIn Jenkins project settings I have selected to \"Rebuild open Merge Requests on push to source or target branch\". Pushing to source branch works as expected, but pushing to target branch doesn't. Although Jenkins is triggered it builds only the most recently created MR.\r\nBelow are some logs from a test setup, with two open MR's (branches add_A and add_B). In this test case I hit the Test button of the Gitlab Webhook I'm using to trigger Jenkins. I get similar logs if master changes.\r\n\r\nGitlab plugin\r\n```\r\nMay 29, 2016 9:46:27 PM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic\r\n\r\nWebHook called with url: /project/gitlab_jenkins_test\r\n\r\nMay 29, 2016 9:46:27 PM FINE com.dabsquared.gitlabjenkins.webhook.build.PushBuildAction\r\n\r\nPush: {\r\n  \"object_kind\" : \"push\",\r\n  \"event_name\" : \"push\",\r\n  \"before\" : \"71de390f32e52b973c9a33761af3f772853abd53\",\r\n  \"after\" : \"71de390f32e52b973c9a33761af3f772853abd53\",\r\n  \"ref\" : \"refs/heads/master\",\r\n  \"checkout_sha\" : \"71de390f32e52b973c9a33761af3f772853abd53\",\r\n  \"message\" : null,\r\n  \"user_id\" : 2,\r\n  \"user_name\" : \"Aristotelis Iordanidis\",\r\n  \"user_email\" : \"aristotelis.iordanidis@XXXX\",\r\n  \"user_avatar\" : \"http://server:8090/uploads/user/avatar/2/aiordani.jpg\",\r\n  \"project_id\" : 74,\r\n  \"project\" : {\r\n    \"name\" : \"jenkins_test\",\r\n    \"description\" : \"A project for testing integration with Jenkins\",\r\n    \"web_url\" : \"http://server:8090/aiordani/jenkins_test\",\r\n    \"avatar_url\" : null,\r\n    \"git_ssh_url\" : \"git@server:aiordani/jenkins_test.git\",\r\n    \"git_http_url\" : \"http://server:8090/aiordani/jenkins_test.git\",\r\n    \"namespace\" : \"aiordani\",\r\n    \"visibility_level\" : 0,\r\n    \"path_with_namespace\" : \"aiordani/jenkins_test\",\r\n    \"default_branch\" : \"master\",\r\n    \"homepage\" : \"http://server:8090/aiordani/jenkins_test\",\r\n    \"url\" : \"git@server:aiordani/jenkins_test.git\",\r\n    \"ssh_url\" : \"git@server:aiordani/jenkins_test.git\",\r\n    \"http_url\" : \"http://server:8090/aiordani/jenkins_test.git\"\r\n  },\r\n  \"commits\" : [ {\r\n    \"id\" : \"71de390f32e52b973c9a33761af3f772853abd53\",\r\n    \"message\" : \"add README\\n\",\r\n    \"timestamp\" : \"2016-05-29T19:06:06+03:00\",\r\n    \"url\" : \"http://server:8090/aiordani/jenkins_test/commit/71de390f32e52b973c9a33761af3f772853abd53\",\r\n    \"author\" : {\r\n      \"name\" : \"Aristotelis Iordanidis\",\r\n      \"email\" : \"aristotelis.iordanidis@XXXX\"\r\n    },\r\n    \"added\" : [ \"README.md\" ],\r\n    \"modified\" : [ ],\r\n    \"removed\" : [ ]\r\n  } ],\r\n  \"total_commits_count\" : 1,\r\n  \"repository\" : {\r\n    \"name\" : \"jenkins_test\",\r\n    \"url\" : \"git@server:aiordani/jenkins_test.git\",\r\n    \"description\" : \"A project for testing integration with Jenkins\",\r\n    \"homepage\" : \"http://server:8090/aiordani/jenkins_test\",\r\n    \"git_http_url\" : \"http://server:8090/aiordani/jenkins_test.git\",\r\n    \"git_ssh_url\" : \"git@server:aiordani/jenkins_test.git\",\r\n    \"visibility_level\" : 0\r\n  }\r\n}\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: GET\r\nURL: http://server.XXXX:8090/api/v3/projects/74/merge_requests?state=opened&page=0&per_page=100\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/74/merge_requests?state=opened&page=0&per_page=100\r\nStatus: 200 OK\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [1325],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:27 GMT],\r\nEtag = [W/\"df9eb265a63cfb0aec84c3b7f6183e19\"],\r\nLink = [<http://server.XXXX:8090/api/v3/projects/74/merge_requests?id=74&page=1&per_page=100&state=opened>; rel=\"first\", <http://server.XXXX:8090/api/v3/projects/74/merge_requests?id=74&page=1&per_page=100&state=opened>; rel=\"last\"],\r\nServer = [nginx],\r\nStatus = [200 OK],\r\nVary = [Origin],\r\nX-Next-Page = [],\r\nX-Page = [1],\r\nX-Per-Page = [100],\r\nX-Prev-Page = [],\r\nX-Request-Id = [f94a7032-985e-40fd-ac10-6d5abfc14aba],\r\nX-Runtime = [0.068201],\r\nX-Total = [2],\r\nX-Total-Pages = [1]\r\n]\r\nResponse body: [ {\r\n  \"id\" : 850,\r\n  \"iid\" : 2,\r\n  \"project_id\" : 74,\r\n  \"title\" : \"Add B\",\r\n  \"description\" : \"\",\r\n  \"state\" : \"opened\",\r\n  \"created_at\" : \"2016-05-29T16:22:11.967Z\",\r\n  \"updated_at\" : \"2016-05-29T16:23:02.408Z\",\r\n  \"target_branch\" : \"master\",\r\n  \"source_branch\" : \"add_B\",\r\n  \"upvotes\" : 0,\r\n  \"downvotes\" : 0,\r\n  \"author\" : {\r\n    \"name\" : \"Aristotelis Iordanidis\",\r\n    \"username\" : \"aiordani\",\r\n    \"id\" : 2,\r\n    \"state\" : \"active\",\r\n    \"avatar_url\" : \"http://server:8090/uploads/user/avatar/2/aiordani.jpg\",\r\n    \"web_url\" : \"http://server:8090/u/aiordani\"\r\n  },\r\n  \"assignee\" : null,\r\n  \"source_project_id\" : 74,\r\n  \"target_project_id\" : 74,\r\n  \"labels\" : [ ],\r\n  \"work_in_progress\" : false,\r\n  \"milestone\" : null,\r\n  \"merge_when_build_succeeds\" : false,\r\n  \"merge_status\" : \"can_be_merged\",\r\n  \"subscribed\" : true,\r\n  \"user_notes_count\" : 2\r\n}, {\r\n  \"id\" : 849,\r\n  \"iid\" : 1,\r\n  \"project_id\" : 74,\r\n  \"title\" : \"Add A\",\r\n  \"description\" : \"\",\r\n  \"state\" : \"opened\",\r\n  \"created_at\" : \"2016-05-29T16:18:17.277Z\",\r\n  \"updated_at\" : \"2016-05-29T16:18:27.949Z\",\r\n  \"target_branch\" : \"master\",\r\n  \"source_branch\" : \"add_A\",\r\n  \"upvotes\" : 0,\r\n  \"downvotes\" : 0,\r\n  \"author\" : {\r\n    \"name\" : \"Aristotelis Iordanidis\",\r\n    \"username\" : \"aiordani\",\r\n    \"id\" : 2,\r\n    \"state\" : \"active\",\r\n    \"avatar_url\" : \"http://server:8090/uploads/user/avatar/2/aiordani.jpg\",\r\n    \"web_url\" : \"http://server:8090/u/aiordani\"\r\n  },\r\n  \"assignee\" : null,\r\n  \"source_project_id\" : 74,\r\n  \"target_project_id\" : 74,\r\n  \"labels\" : [ ],\r\n  \"work_in_progress\" : false,\r\n  \"milestone\" : null,\r\n  \"merge_when_build_succeeds\" : false,\r\n  \"merge_status\" : \"can_be_merged\",\r\n  \"subscribed\" : true,\r\n  \"user_notes_count\" : 1\r\n} ]\r\n\r\nMay 29, 2016 9:46:27 PM INFO com.dabsquared.gitlabjenkins.trigger.handler.push.OpenMergeRequestPushHookTriggerHandler handleMergeRequest\r\n\r\ngitlab_jenkins_test triggered for push to target branch of open merge request #850.\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: GET\r\nURL: http://server.XXXX:8090/api/v3/projects/74/repository/branches/add_B\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/74/repository/branches/add_B\r\nStatus: 200 OK\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [456],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:27 GMT],\r\nEtag = [W/\"092b95c2c46fa17c6d49d2dc51c79e8a\"],\r\nServer = [nginx],\r\nStatus = [200 OK],\r\nVary = [Origin],\r\nX-Request-Id = [e2f80540-76a5-4b83-87f0-ea2971287890],\r\nX-Runtime = [0.019190]\r\n]\r\nResponse body: {\r\n  \"name\" : \"add_B\",\r\n  \"commit\" : {\r\n    \"id\" : \"75b81c2c56807965658f0c08fbfc8556f1389afa\",\r\n    \"message\" : \"Add B\\n\",\r\n    \"parent_ids\" : [ \"b7af5d02f37ddb04dcf78a23fba05d1bdf6faab7\" ],\r\n    \"authored_date\" : \"2016-05-29T19:21:26.000+03:00\",\r\n    \"author_name\" : \"Aristotelis Iordanidis\",\r\n    \"author_email\" : \"aristotelis.iordanidis@XXXX\",\r\n    \"committed_date\" : \"2016-05-29T19:21:26.000+03:00\",\r\n    \"committer_name\" : \"Aristotelis Iordanidis\",\r\n    \"committer_email\" : \"aristotelis.iordanidis@XXXX\"\r\n  },\r\n  \"protected\" : false\r\n}\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: GET\r\nURL: http://server.XXXX:8090/api/v3/projects/74\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/74\r\nStatus: 200 OK\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [1402],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:27 GMT],\r\nEtag = [W/\"0269bb7a74c9950d86a7677f015d56ea\"],\r\nServer = [nginx],\r\nStatus = [200 OK],\r\nVary = [Origin],\r\nX-Request-Id = [3471aa58-8522-491a-a19e-854a3866de53],\r\nX-Runtime = [0.038702]\r\n]\r\nResponse body: {\r\n  \"id\" : 74,\r\n  \"description\" : \"A project for testing integration with Jenkins\",\r\n  \"default_branch\" : \"master\",\r\n  \"tag_list\" : [ ],\r\n  \"public\" : false,\r\n  \"archived\" : false,\r\n  \"visibility_level\" : 0,\r\n  \"ssh_url_to_repo\" : \"git@server:aiordani/jenkins_test.git\",\r\n  \"http_url_to_repo\" : \"http://server:8090/aiordani/jenkins_test.git\",\r\n  \"web_url\" : \"http://server:8090/aiordani/jenkins_test\",\r\n  \"owner\" : {\r\n    \"name\" : \"Aristotelis Iordanidis\",\r\n    \"username\" : \"aiordani\",\r\n    \"id\" : 2,\r\n    \"state\" : \"active\",\r\n    \"avatar_url\" : \"http://server:8090/uploads/user/avatar/2/aiordani.jpg\",\r\n    \"web_url\" : \"http://server:8090/u/aiordani\"\r\n  },\r\n  \"name\" : \"jenkins_test\",\r\n  \"name_with_namespace\" : \"Aristotelis Iordanidis / jenkins_test\",\r\n  \"path\" : \"jenkins_test\",\r\n  \"path_with_namespace\" : \"aiordani/jenkins_test\",\r\n  \"issues_enabled\" : true,\r\n  \"merge_requests_enabled\" : true,\r\n  \"wiki_enabled\" : true,\r\n  \"builds_enabled\" : true,\r\n  \"snippets_enabled\" : false,\r\n  \"container_registry_enabled\" : true,\r\n  \"created_at\" : \"2016-05-29T16:01:32.732Z\",\r\n  \"last_activity_at\" : \"2016-05-29T16:22:44.066Z\",\r\n  \"shared_runners_enabled\" : true,\r\n  \"creator_id\" : 2,\r\n  \"namespace\" : {\r\n    \"id\" : 2,\r\n    \"name\" : \"aiordani\",\r\n    \"path\" : \"aiordani\",\r\n    \"owner_id\" : 2,\r\n    \"created_at\" : \"2015-09-05T16:10:23.352Z\",\r\n    \"updated_at\" : \"2015-09-05T16:10:23.352Z\",\r\n    \"description\" : \"\",\r\n    \"avatar\" : null,\r\n    \"share_with_group_lock\" : false,\r\n    \"visibility_level\" : 20\r\n  },\r\n  \"avatar_url\" : null,\r\n  \"star_count\" : 1,\r\n  \"forks_count\" : 0,\r\n  \"open_issues_count\" : 0,\r\n  \"public_builds\" : true,\r\n  \"permissions\" : {\r\n    \"project_access\" : {\r\n      \"access_level\" : 30,\r\n      \"notification_level\" : 3\r\n    },\r\n    \"group_access\" : null\r\n  }\r\n}\r\n\r\nMay 29, 2016 9:46:27 PM INFO com.dabsquared.gitlabjenkins.trigger.handler.push.OpenMergeRequestPushHookTriggerHandler handleMergeRequest\r\n\r\ngitlab_jenkins_test triggered for push to target branch of open merge request #849.\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: GET\r\nURL: http://server.XXXX:8090/api/v3/projects/74/repository/branches/add_A\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/74/repository/branches/add_A\r\nStatus: 200 OK\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [456],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:27 GMT],\r\nEtag = [W/\"bb85218d3ddbee834d94480b515c0c99\"],\r\nServer = [nginx],\r\nStatus = [200 OK],\r\nVary = [Origin],\r\nX-Request-Id = [b4068b5b-a265-47e4-8f1c-74c8dd35631b],\r\nX-Runtime = [0.022237]\r\n]\r\nResponse body: {\r\n  \"name\" : \"add_A\",\r\n  \"commit\" : {\r\n    \"id\" : \"b7af5d02f37ddb04dcf78a23fba05d1bdf6faab7\",\r\n    \"message\" : \"Add A\\n\",\r\n    \"parent_ids\" : [ \"71de390f32e52b973c9a33761af3f772853abd53\" ],\r\n    \"authored_date\" : \"2016-05-29T19:15:47.000+03:00\",\r\n    \"author_name\" : \"Aristotelis Iordanidis\",\r\n    \"author_email\" : \"aristotelis.iordanidis@XXXX\",\r\n    \"committed_date\" : \"2016-05-29T19:15:47.000+03:00\",\r\n    \"committer_name\" : \"Aristotelis Iordanidis\",\r\n    \"committer_email\" : \"aristotelis.iordanidis@XXXX\"\r\n  },\r\n  \"protected\" : false\r\n}\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: GET\r\nURL: http://server.XXXX:8090/api/v3/projects/74\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:27 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/74\r\nStatus: 200 OK\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [1402],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:27 GMT],\r\nEtag = [W/\"0269bb7a74c9950d86a7677f015d56ea\"],\r\nServer = [nginx],\r\nStatus = [200 OK],\r\nVary = [Origin],\r\nX-Request-Id = [30df12fa-68fa-43ae-bd40-c172073627fb],\r\nX-Runtime = [0.034104]\r\n]\r\nResponse body: {\r\n  \"id\" : 74,\r\n  \"description\" : \"A project for testing integration with Jenkins\",\r\n  \"default_branch\" : \"master\",\r\n  \"tag_list\" : [ ],\r\n  \"public\" : false,\r\n  \"archived\" : false,\r\n  \"visibility_level\" : 0,\r\n  \"ssh_url_to_repo\" : \"git@server:aiordani/jenkins_test.git\",\r\n  \"http_url_to_repo\" : \"http://server:8090/aiordani/jenkins_test.git\",\r\n  \"web_url\" : \"http://server:8090/aiordani/jenkins_test\",\r\n  \"owner\" : {\r\n    \"name\" : \"Aristotelis Iordanidis\",\r\n    \"username\" : \"aiordani\",\r\n    \"id\" : 2,\r\n    \"state\" : \"active\",\r\n    \"avatar_url\" : \"http://server:8090/uploads/user/avatar/2/aiordani.jpg\",\r\n    \"web_url\" : \"http://server:8090/u/aiordani\"\r\n  },\r\n  \"name\" : \"jenkins_test\",\r\n  \"name_with_namespace\" : \"Aristotelis Iordanidis / jenkins_test\",\r\n  \"path\" : \"jenkins_test\",\r\n  \"path_with_namespace\" : \"aiordani/jenkins_test\",\r\n  \"issues_enabled\" : true,\r\n  \"merge_requests_enabled\" : true,\r\n  \"wiki_enabled\" : true,\r\n  \"builds_enabled\" : true,\r\n  \"snippets_enabled\" : false,\r\n  \"container_registry_enabled\" : true,\r\n  \"created_at\" : \"2016-05-29T16:01:32.732Z\",\r\n  \"last_activity_at\" : \"2016-05-29T16:22:44.066Z\",\r\n  \"shared_runners_enabled\" : true,\r\n  \"creator_id\" : 2,\r\n  \"namespace\" : {\r\n    \"id\" : 2,\r\n    \"name\" : \"aiordani\",\r\n    \"path\" : \"aiordani\",\r\n    \"owner_id\" : 2,\r\n    \"created_at\" : \"2015-09-05T16:10:23.352Z\",\r\n    \"updated_at\" : \"2015-09-05T16:10:23.352Z\",\r\n    \"description\" : \"\",\r\n    \"avatar\" : null,\r\n    \"share_with_group_lock\" : false,\r\n    \"visibility_level\" : 20\r\n  },\r\n  \"avatar_url\" : null,\r\n  \"star_count\" : 1,\r\n  \"forks_count\" : 0,\r\n  \"open_issues_count\" : 0,\r\n  \"public_builds\" : true,\r\n  \"permissions\" : {\r\n    \"project_access\" : {\r\n      \"access_level\" : 30,\r\n      \"notification_level\" : 3\r\n    },\r\n    \"group_access\" : null\r\n  }\r\n}\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: GET\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/repository/commits/75b81c2c56807965658f0c08fbfc8556f1389afa\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/repository/commits/75b81c2c56807965658f0c08fbfc8556f1389afa\r\nStatus: 200 OK\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [417],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:37 GMT],\r\nEtag = [W/\"bcb7ce11c06c93a6a192989001d9b2ed\"],\r\nServer = [nginx],\r\nStatus = [200 OK],\r\nVary = [Origin],\r\nX-Request-Id = [4a93962c-1b3e-4d0d-a5b2-188daf87573f],\r\nX-Runtime = [0.046831]\r\n]\r\nResponse body: {\r\n  \"id\" : \"75b81c2c56807965658f0c08fbfc8556f1389afa\",\r\n  \"short_id\" : \"75b81c2c\",\r\n  \"title\" : \"Add B\",\r\n  \"author_name\" : \"Aristotelis Iordanidis\",\r\n  \"author_email\" : \"aristotelis.iordanidis@XXXX\",\r\n  \"created_at\" : \"2016-05-29T19:21:26.000+03:00\",\r\n  \"message\" : \"Add B\\n\",\r\n  \"parent_ids\" : [ \"b7af5d02f37ddb04dcf78a23fba05d1bdf6faab7\" ],\r\n  \"committed_date\" : \"2016-05-29T19:21:26.000+03:00\",\r\n  \"authored_date\" : \"2016-05-29T19:21:26.000+03:00\",\r\n  \"status\" : \"success\"\r\n}\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: POST\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/statuses/75b81c2c56807965658f0c08fbfc8556f1389afa?state=running&ref=add_B&context=jenkins&target_url=http%3A%2F%2Fserver.XXXX%3A8080%2Fjob%2Fgitlab_jenkins_test%2F4%2F\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/statuses/75b81c2c56807965658f0c08fbfc8556f1389afa?state=running&ref=add_B&context=jenkins&target_url=http%3A%2F%2Fserver.XXXX%3A8080%2Fjob%2Fgitlab_jenkins_test%2F4%2F\r\nStatus: 201 Created\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [510],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:37 GMT],\r\nEtag = [W/\"124a465b0ef1fbe949f7c2cf074fc2ae\"],\r\nServer = [nginx],\r\nStatus = [201 Created],\r\nVary = [Origin],\r\nX-Request-Id = [2f235f88-96e9-4a31-b309-63d8cad953e8],\r\nX-Runtime = [0.157537]\r\n]\r\nResponse body: {\r\n  \"id\" : 3045,\r\n  \"sha\" : \"75b81c2c56807965658f0c08fbfc8556f1389afa\",\r\n  \"ref\" : \"add_B\",\r\n  \"status\" : \"running\",\r\n  \"name\" : \"jenkins\",\r\n  \"target_url\" : \"http://server.XXXX:8080/job/gitlab_jenkins_test/4/\",\r\n  \"description\" : null,\r\n  \"created_at\" : \"2016-05-29T18:46:37.325Z\",\r\n  \"started_at\" : \"2016-05-29T18:46:37.438Z\",\r\n  \"finished_at\" : null,\r\n  \"allow_failure\" : false,\r\n  \"author\" : {\r\n    \"name\" : \"Jenkins\",\r\n    \"username\" : \"jenkins\",\r\n    \"id\" : 10,\r\n    \"state\" : \"active\",\r\n    \"avatar_url\" : \"http://server:8090/uploads/user/avatar/10/jenkins.png\",\r\n    \"web_url\" : \"http://server:8090/u/jenkins\"\r\n  }\r\n}\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: GET\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/repository/commits/75b81c2c56807965658f0c08fbfc8556f1389afa\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/repository/commits/75b81c2c56807965658f0c08fbfc8556f1389afa\r\nStatus: 200 OK\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [417],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:37 GMT],\r\nEtag = [W/\"2eda5d6e8400c88b1b02641e73340b75\"],\r\nServer = [nginx],\r\nStatus = [200 OK],\r\nVary = [Origin],\r\nX-Request-Id = [dfa1e98b-a7d5-43d2-bde1-bc6fe48c470c],\r\nX-Runtime = [0.034888]\r\n]\r\nResponse body: {\r\n  \"id\" : \"75b81c2c56807965658f0c08fbfc8556f1389afa\",\r\n  \"short_id\" : \"75b81c2c\",\r\n  \"title\" : \"Add B\",\r\n  \"author_name\" : \"Aristotelis Iordanidis\",\r\n  \"author_email\" : \"aristotelis.iordanidis@XXXX\",\r\n  \"created_at\" : \"2016-05-29T19:21:26.000+03:00\",\r\n  \"message\" : \"Add B\\n\",\r\n  \"parent_ids\" : [ \"b7af5d02f37ddb04dcf78a23fba05d1bdf6faab7\" ],\r\n  \"committed_date\" : \"2016-05-29T19:21:26.000+03:00\",\r\n  \"authored_date\" : \"2016-05-29T19:21:26.000+03:00\",\r\n  \"status\" : \"running\"\r\n}\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: POST\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/statuses/75b81c2c56807965658f0c08fbfc8556f1389afa?state=success&ref=add_B&context=jenkins&target_url=http%3A%2F%2Fserver.XXXX%3A8080%2Fjob%2Fgitlab_jenkins_test%2F4%2F\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/aiordani%2Fjenkins_test/statuses/75b81c2c56807965658f0c08fbfc8556f1389afa?state=success&ref=add_B&context=jenkins&target_url=http%3A%2F%2Fserver.XXXX%3A8080%2Fjob%2Fgitlab_jenkins_test%2F4%2F\r\nStatus: 201 Created\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [532],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:37 GMT],\r\nEtag = [W/\"aea6334c50e7413d6517625bc8ce281e\"],\r\nServer = [nginx],\r\nStatus = [201 Created],\r\nVary = [Origin],\r\nX-Request-Id = [ad7aebdf-4f8f-44ce-9aa5-c8f4cde8e187],\r\nX-Runtime = [0.077257]\r\n]\r\nResponse body: {\r\n  \"id\" : 3045,\r\n  \"sha\" : \"75b81c2c56807965658f0c08fbfc8556f1389afa\",\r\n  \"ref\" : \"add_B\",\r\n  \"status\" : \"success\",\r\n  \"name\" : \"jenkins\",\r\n  \"target_url\" : \"http://server.XXXX:8080/job/gitlab_jenkins_test/4/\",\r\n  \"description\" : null,\r\n  \"created_at\" : \"2016-05-29T18:46:37.325Z\",\r\n  \"started_at\" : \"2016-05-29T18:46:37.438Z\",\r\n  \"finished_at\" : \"2016-05-29T18:46:37.570Z\",\r\n  \"allow_failure\" : false,\r\n  \"author\" : {\r\n    \"name\" : \"Jenkins\",\r\n    \"username\" : \"jenkins\",\r\n    \"id\" : 10,\r\n    \"state\" : \"active\",\r\n    \"avatar_url\" : \"http://server:8090/uploads/user/avatar/10/jenkins.png\",\r\n    \"web_url\" : \"http://server:8090/u/jenkins\"\r\n  }\r\n}\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nCall GitLab:\r\nHTTP method: POST\r\nURL: http://server.XXXX:8090/api/v3/projects/74/merge_requests/850/notes?body=%3A%2B1%3A+Jenkins+Build+Success%0A%0AResults+available+at%3A+%5BJenkins+%5Bgitlab_jenkins_test+%234%5D%5D%28http%3A%2F%2Fserver.XXXX%3A8080%2Fjob%2Fgitlab_jenkins_test%2F4%2F%29\r\nRequest headers: [\r\nAccept = [application/json],\r\nPRIVATE-TOKEN = [****FILTERED****]\r\n]\r\n\r\nMay 29, 2016 9:46:37 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder\r\n\r\nGot response from GitLab:\r\nURL: http://server.XXXX:8090/api/v3/projects/74/merge_requests/850/notes?body=%3A%2B1%3A+Jenkins+Build+Success%0A%0AResults+available+at%3A+%5BJenkins+%5Bgitlab_jenkins_test+%234%5D%5D%28http%3A%2F%2Fserver.XXXX%3A8080%2Fjob%2Fgitlab_jenkins_test%2F4%2F%29\r\nStatus: 201 Created\r\nResponse headers: [\r\nCache-Control = [max-age=0, private, must-revalidate],\r\nConnection = [keep-alive],\r\nContent-Length = [547],\r\nContent-Type = [application/json],\r\nDate = [Sun, 29 May 2016 18:46:37 GMT],\r\nEtag = [W/\"4e47a80fe3ec2ac5c34dba55a7cbf500\"],\r\nServer = [nginx],\r\nStatus = [201 Created],\r\nVary = [Origin],\r\nX-Request-Id = [9a2ae4ca-d644-428a-83be-641fc9e77486],\r\nX-Runtime = [0.107809]\r\n]\r\nResponse body: {\r\n  \"id\" : 8053,\r\n  \"body\" : \":+1: Jenkins Build Success\\n\\nResults available at: [Jenkins [gitlab_jenkins_test #4]](http://server.XXXX:8080/job/gitlab_jenkins_test/4/)\",\r\n  \"attachment\" : null,\r\n  \"author\" : {\r\n    \"name\" : \"Jenkins\",\r\n    \"username\" : \"jenkins\",\r\n    \"id\" : 10,\r\n    \"state\" : \"active\",\r\n    \"avatar_url\" : \"http://server:8090/uploads/user/avatar/10/jenkins.png\",\r\n    \"web_url\" : \"http://server:8090/u/jenkins\"\r\n  },\r\n  \"created_at\" : \"2016-05-29T18:46:37.651Z\",\r\n  \"updated_at\" : \"2016-05-29T18:46:37.651Z\",\r\n  \"system\" : false,\r\n  \"noteable_id\" : 850,\r\n  \"noteable_type\" : \"MergeRequest\",\r\n  \"upvote\" : false,\r\n  \"downvote\" : false\r\n}\r\n```\r\n\r\nThe console output of the job that runs because of the above is:\r\n```\r\nGitLab Merge Request #2: aiordani/add_B => master\r\nGitLab Merge Request #2: aiordani/add_B => master\r\n[EnvInject] - Loading node environment variables.\r\nBuilding in workspace /home/jenkins/.jenkins/jobs/gitlab_jenkins_test/workspace\r\n > git rev-parse --is-inside-work-tree # timeout=10\r\nFetching changes from the remote Git repository\r\n > git config remote.origin.url git@server:aiordani/jenkins_test.git # timeout=10\r\nPruning obsolete local branches\r\nFetching upstream changes from git@server:aiordani/jenkins_test.git\r\n > git --version # timeout=10\r\nusing GIT_SSH to set credentials \r\n > git -c core.askpass=true fetch --tags --progress git@server:aiordani/jenkins_test.git +refs/heads/*:refs/remotes/origin/* --prune\r\n > git rev-parse refs/remotes/origin/add_B^{commit} # timeout=10\r\n > git rev-parse refs/remotes/origin/origin/add_B^{commit} # timeout=10\r\nMerging Revision 75b81c2c56807965658f0c08fbfc8556f1389afa (refs/remotes/origin/add_B) to origin/master, UserMergeOptions{mergeRemote='origin', mergeTarget='${gitlabTargetBranch}', mergeStrategy='default', fastForwardMode='--ff'}\r\n > git rev-parse origin/master^{commit} # timeout=10\r\n > git config core.sparsecheckout # timeout=10\r\n > git checkout -f origin/master\r\n > git merge --ff 75b81c2c56807965658f0c08fbfc8556f1389afa # timeout=10\r\n > git rev-parse HEAD^{commit} # timeout=10\r\nSeen branch in repository origin/add_A\r\nSeen branch in repository origin/add_B\r\nSeen branch in repository origin/master\r\nSeen 3 remote branches\r\nChecking out Revision 75b81c2c56807965658f0c08fbfc8556f1389afa (origin/add_B, origin/master)\r\n > git config core.sparsecheckout # timeout=10\r\n > git checkout -f 75b81c2c56807965658f0c08fbfc8556f1389afa\r\n > git rev-list 75b81c2c56807965658f0c08fbfc8556f1389afa # timeout=10\r\n > git rev-list 75b81c2c56807965658f0c08fbfc8556f1389afa # timeout=10\r\n[workspace] $ /bin/sh -xe /tmp/hudson6096428407171560934.sh\r\nFinished: SUCCESS\r\n```\r\n\r\nIn the log above you see that this line appears twice\r\n```\r\nGitLab Merge Request #2: aiordani/add_B => master\r\n```\r\nIn general, the same line (which corresponds to the most recently created MR) appears as many times as there are open merge requests.\r\n\r\nThe same problem happens with Gitlab v8.7.\r\n\r\nThe same setup worked OK with Jenkins v1.x, plugin v1.1.x and Gitlab prior to v8.5.\r\n\r\nPlease let me know if you need any more information to fix this.\r\n\r\nThank you,\r\n\r\n  Telis"},"comment":{"url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/comments/225997541","html_url":"https://github.com/jenkinsci/gitlab-plugin/issues/340#issuecomment-225997541","issue_url":"https://api.github.com/repos/jenkinsci/gitlab-plugin/issues/340","id":225997541,"user":{"login":"omehegan","id":1775894,"avatar_url":"https://avatars.githubusercontent.com/u/1775894?v=3","gravatar_id":"","url":"https://api.github.com/users/omehegan","html_url":"https://github.com/omehegan","followers_url":"https://api.github.com/users/omehegan/followers","following_url":"https://api.github.com/users/omehegan/following{/other_user}","gists_url":"https://api.github.com/users/omehegan/gists{/gist_id}","starred_url":"https://api.github.com/users/omehegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omehegan/subscriptions","organizations_url":"https://api.github.com/users/omehegan/orgs","repos_url":"https://api.github.com/users/omehegan/repos","events_url":"https://api.github.com/users/omehegan/events{/privacy}","received_events_url":"https://api.github.com/users/omehegan/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T19:57:11Z","updated_at":"2016-06-14T19:57:11Z","body":"@telisior @randyaa are the Jenkins jobs you're using Freestyle, Pipeline, or something else?"}}
{"actor":{"display_login":"omehegan"}}