jenkinsci / jenkinsci/gitlab-plugin
Closed Merge Request Events does not trigger job
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
## Issue
### Context
- **Gitlab plugin version**: 1.5.12
- **Gitlab version**: 11.11.2-ce
- **Jenkins version**: 2.181
- **Job type**: Freestyle
### Logs & Traces
```
Jul 16, 2019 2:13:55 PM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
WebHook called with url: /project/MY_PROJECT
Jul 16, 2019 2:13:55 PM FINE com.dabsquared.gitlabjenkins.webhook.build.MergeRequestBuildAction
MergeRequest: {
"object_kind" : "merge_request",
"event_type" : "merge_request",
"user" : {
"name" : "Daniele Siragusa",
"username" : "dsiragusa",
"avatar_url" : "URL"
},
"project" : {
"id" : 4777,
"name" : "NAME",
"description" : "DESC",
"web_url" : "WEB_URL",
"avatar_url" : "AVATAR_URL",
"git_ssh_url" : "GIT_SSH_URL",
"git_http_url" : "GIT_HTTP_URL",
"namespace" : "NAMESPACE",
"visibility_level" : 0,
"path_with_namespace" : "ORG/PROJECT",
"default_branch" : "develop",
"ci_config_path" : "",
"homepage" : "HOMEPAGE",
"url" : "URL",
"ssh_url" : "SSH_URL",
"http_url" : "URL"
},
"object_attributes" : {
"assignee_id" : null,
"author_id" : 119,
"created_at" : "2019-07-16 07:14:18 UTC",
"description" : "",
"head_pipeline_id" : 40341,
"id" : 31292,
"iid" : 650,
"last_edited_at" : null,
"last_edited_by_id" : null,
"merge_commit_sha" : null,
"merge_error" : null,
"merge_params" : {
"force_remove_source_branch" : "0"
},
"merge_status" : "can_be_merged",
"merge_user_id" : null,
"merge_when_pipeline_succeeds" : false,
"milestone_id" : null,
"source_branch" : "SRC_BRANCH",
"source_project_id" : 4777,
"state" : "closed",
"target_branch" : "develop",
"target_project_id" : 4777,
"time_estimate" : 0,
"title" : "TITLE",
"updated_at" : "2019-07-16 12:13:55 UTC",
"updated_by_id" : null,
"url" : "MR_URL",
"source" : {
"id" : 4777,
"name" : "NAME",
"description" : "DESC",
"web_url" : "WEB_URL",
"avatar_url" : "AVATAR_URL",
"git_ssh_url" : "GIT_SSH_URL",
"git_http_url" : "GIT_HTTP_URL",
"namespace" : "NAMESPACE",
"visibility_level" : 0,
"path_with_namespace" : "ORG/PROJECT",
"default_branch" : "develop",
"ci_config_path" : "",
"homepage" : "HOMEPAGE",
"url" : "URL",
"ssh_url" : "SSH_URL",
"http_url" : "HTTP_URL"
},
"target" : {
"id" : 4777,
"name" : "NAME",
"description" : "DESC",
"web_url" : "WEB_URL",
"avatar_url" : "AVATAR_URL",
"git_ssh_url" : "GIT_SSH_URL",
"git_http_url" : "GIT_HTTP_URL",
"namespace" : "NAMESPACE",
"visibility_level" : 0,
"path_with_namespace" : "ORG/PROJECT",
"default_branch" : "develop",
"ci_config_path" : "",
"homepage" : "HOMEPAGE",
"url" : "URL",
"ssh_url" : "SSH_URL",
"http_url" : "HTTP_URL"
},
"last_commit" : {
"id" : "COMMIT_ID",
"message" : "MESSAGE",
"timestamp" : "2019-07-16T07:13:59Z",
"url" : "URL",
"author" : {
"name" : "Daniele Siragusa",
"email" : "EMAIL"
}
},
"work_in_progress" : false,
"total_time_spent" : 0,
"human_total_time_spent" : null,
"human_time_estimate" : null,
"assignee_ids" : [ ],
"action" : "close"
},
"labels" : [ ],
"changes" : {
"state" : {
"previous" : "opened",
"current" : "closed"
},
"updated_at" : {
"previous" : "2019-07-16 12:12:38 UTC",
"current" : "2019-07-16 12:13:55 UTC"
},
"total_time_spent" : {
"previous" : null,
"current" : 0
}
},
"repository" : {
"name" : "NAME",
"url" : "URL",
"description" : "DESC",
"homepage" : "HOMEPAGE"
}
}
```
### Problem description
Hello, I'd like to trigger a job on Accepted Merge Request Events and Closed Merge Request Events.
Accepted Merge Request Events correctly trigger the job but that's not the case for Closed Merge Request Events:
the webhook is correctly sent by Gitlab, Jenkins answers with a 200 status code but does nothing.
Contributor guide
Assessment
This issue has not been assessed yet.