You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zh...@apache.org on 2022/08/26 11:05:55 UTC

[incubator-devlake] branch main updated: feat(gitlab): add e2e for mr comments (#2835)

This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new ac068e0b feat(gitlab): add e2e for mr comments (#2835)
ac068e0b is described below

commit ac068e0b8dc284c1a38b48bcf666099070af79a3
Author: Warren Chen <yi...@merico.dev>
AuthorDate: Fri Aug 26 19:05:51 2022 +0800

    feat(gitlab): add e2e for mr comments (#2835)
---
 .../gitlab/e2e/raw_tables/_raw_gitlab_api_merge_request_notes.csv  | 6 ++++++
 .../_raw_gitlab_api_merge_requests_for_mr_notes_test.csv           | 4 ++++
 .../_tool_gitlab_merge_requests_for_mr_notes_test.csv              | 7 +++++++
 plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_comments.csv    | 6 ++++++
 plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_notes.csv       | 6 ++++++
 plugins/gitlab/e2e/snapshot_tables/pull_request_comments.csv       | 6 ++++++
 plugins/gitlab/tasks/mr_comment_convertor.go                       | 7 ++++++-
 plugins/gitlab/tasks/mr_note_extractor.go                          | 2 +-
 8 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_request_notes.csv b/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_request_notes.csv
index 94b3c8d6..134afdfa 100644
--- a/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_request_notes.csv
+++ b/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_request_notes.csv
@@ -19,3 +19,9 @@ id,params,data,url,input,created_at
 18,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":208185588,""type"":null,""body"":""restored source branch `4-config-is-not-generic-enough`"",""attachment"":null,""author"":{""id"":2295562,""username"":""emilie"",""name"":""Emilie Schario"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/2295562/avatar.png"",""web_url"":""https://gitlab.com/emilie""},""created_at"":""2019-08-26T15:33:21.878Z"",""updated_at"":""2019-08-26T15:33:21.884Z"",""sy [...]
 19,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":208185663,""type"":null,""body"":""assigned to @emilie"",""attachment"":null,""author"":{""id"":2295562,""username"":""emilie"",""name"":""Emilie Schario"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/2295562/avatar.png"",""web_url"":""https://gitlab.com/emilie""},""created_at"":""2019-08-26T15:33:34.019Z"",""updated_at"":""2019-08-26T15:33:34.023Z"",""system"":true,""noteable_id"":35841926 [...]
 20,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":208186075,""type"":null,""body"":""added 1 commit\n\n\u003cul\u003e\u003cli\u003e91e5666b - remove config\u003c/li\u003e\u003c/ul\u003e\n\n[Compare with previous version](/gitlab-data/snowflake_spend/merge_requests/4/diffs?diff_id=52612655\u0026start_sha=d678bea9d47b42eb13512d1c9d6a592d80b432d4)"",""attachment"":null,""author"":{""id"":2295562,""username"":""emilie"",""name"":""Emilie Schario"",""state"":""active"",""avatar_url"": [...]
+71,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":135100359,""type"":null,""body"":""approved this merge request"",""attachment"":null,""author"":{""id"":3393147,""username"":""liyongfeng"",""name"":""Yongfeng Li"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/3393147/avatar.png"",""web_url"":""https://gitlab.com/liyongfeng""},""created_at"":""2019-01-25T16:46:23.996Z"",""updated_at"":""2019-01-25T16:46:23.996Z"",""system"":true,""noteable_ [...]
+126,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":135223089,""type"":null,""body"":""approved this merge request"",""attachment"":null,""author"":{""id"":3393147,""username"":""liyongfeng"",""name"":""Yongfeng Li"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/3393147/avatar.png"",""web_url"":""https://gitlab.com/liyongfeng""},""created_at"":""2019-01-26T11:41:34.158Z"",""updated_at"":""2019-01-26T11:41:34.158Z"",""system"":true,""noteable [...]
+151,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":137424744,""type"":null,""body"":""approved this merge request"",""attachment"":null,""author"":{""id"":3014346,""username"":""hackwaly"",""name"":""文宇祥"",""state"":""active"",""avatar_url"":""https://secure.gravatar.com/avatar/5d814c4a23f3346e8bb40f454a039663?s=80\u0026d=identicon"",""web_url"":""https://gitlab.com/hackwaly""},""created_at"":""2019-02-01T11:43:54.686Z"",""updated_at"":""2019-02-01T11:43:54.686Z"",""system"":true [...]
+169,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":135848627,""type"":null,""body"":""approved this merge request"",""attachment"":null,""author"":{""id"":2436773,""username"":""basicthinker"",""name"":""Jinglei Ren"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/2436773/avatar.png"",""web_url"":""https://gitlab.com/basicthinker""},""created_at"":""2019-01-29T00:40:37.158Z"",""updated_at"":""2019-01-29T00:40:37.158Z"",""system"":true,""note [...]
+170,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":135848646,""type"":null,""body"":""unapproved this merge request"",""attachment"":null,""author"":{""id"":2436773,""username"":""basicthinker"",""name"":""Jinglei Ren"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/2436773/avatar.png"",""web_url"":""https://gitlab.com/basicthinker""},""created_at"":""2019-01-29T00:40:45.520Z"",""updated_at"":""2019-01-29T00:40:45.520Z"",""system"":true,""no [...]
+171,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":135848654,""type"":null,""body"":""approved this merge request"",""attachment"":null,""author"":{""id"":2436773,""username"":""basicthinker"",""name"":""Jinglei Ren"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/2436773/avatar.png"",""web_url"":""https://gitlab.com/basicthinker""},""created_at"":""2019-01-29T00:40:47.455Z"",""updated_at"":""2019-01-29T00:40:47.455Z"",""system"":true,""note [...]
diff --git a/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_requests_for_mr_notes_test.csv b/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_requests_for_mr_notes_test.csv
index 414eb2fa..ca2600a8 100644
--- a/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_requests_for_mr_notes_test.csv
+++ b/plugins/gitlab/e2e/raw_tables/_raw_gitlab_api_merge_requests_for_mr_notes_test.csv
@@ -11,3 +11,7 @@ id,params,data,url,input,created_at
 10,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":58311001,""iid"":10,""project_id"":12345678,""title"":""Update version in readme"",""description"":"""",""state"":""merged"",""created_at"":""2020-05-11T17:09:12.265Z"",""updated_at"":""2020-05-11T17:09:20.565Z"",""merged_by"":{""id"":2295562,""username"":""emilie"",""name"":""Emilie Schario"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/system/user/avatar/2295562/avatar.png"",""web_url"":""https://gitlab.com [...]
 11,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":62519057,""iid"":11,""project_id"":12345678,""title"":""Clustering metering models"",""description"":"""",""state"":""opened"",""created_at"":""2020-06-24T12:34:04.792Z"",""updated_at"":""2020-06-24T12:35:01.115Z"",""merged_by"":null,""merge_user"":null,""merged_at"":null,""closed_by"":null,""closed_at"":null,""target_branch"":""master"",""source_branch"":""clustering-metering"",""user_notes_count"":0,""upvotes"":0,""downvotes"":0 [...]
 12,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":65505080,""iid"":12,""project_id"":12345678,""title"":""Resolve \""Upgrade package for dbt 0.17\"""",""description"":""Closes #11 \n\n* Upgrades to 0.17.0 format\n* Formatting changes to be in line with GitLab SQL Style Guide"",""state"":""merged"",""created_at"":""2020-07-24T17:47:08.238Z"",""updated_at"":""2020-07-24T21:13:34.907Z"",""merged_by"":{""id"":1942272,""username"":""tayloramurphy"",""name"":""Taylor A Murphy"",""state [...]
+18,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":1149942101,""iid"":29,""project_id"":12345678,""title"":""Add support for Snowpipe usage monitoring"",""description"":""Add models and docs for Snowflake pipes (Snowpipe) usage monitoring based on the views in Snowflake Usage schema"",""state"":""opened"",""created_at"":""2021-09-01T21:15:30.334Z"",""updated_at"":""2022-06-30T21:41:49.705Z"",""merged_by"":null,""merge_user"":null,""merged_at"":null,""closed_by"":null,""closed_at"" [...]
+19,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":135772105,""iid"":30,""project_id"":12345678,""title"":""Updates for dbt 1.0"",""description"":""This MR sets up the repo for dbt 1.0\nA few configs were renamed.\n\nCould a new release be made for dbt 1.0?"",""state"":""opened"",""created_at"":""2022-01-18T19:59:30.723Z"",""updated_at"":""2022-02-10T14:13:47.663Z"",""merged_by"":null,""merge_user"":null,""merged_at"":null,""closed_by"":null,""closed_at"":null,""target_branch"":"" [...]
+20,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":145032495,""iid"":46,""project_id"":12345678,""title"":""Draft: Update dbt_project.yml"",""description"":"""",""state"":""closed"",""created_at"":""2022-03-15T03:07:06.077Z"",""updated_at"":""2022-03-15T03:07:22.642Z"",""merged_by"":null,""merge_user"":null,""merged_at"":null,""closed_by"":{""id"":9722492,""username"":""PedramNavid"",""name"":""Pedram Navid"",""state"":""active"",""avatar_url"":""https://gitlab.com/uploads/-/syste [...]
+21,"{""ConnectionId"":1,""ProjectId"":12345678}","{""id"":15869219,""iid"":37,""project_id"":12345678,""title"":""Draft: Corrections for dbt 1"",""description"":""Closes https://gitlab.com/gitlab-data/analytics/-/issues/12941"",""state"":""opened"",""created_at"":""2022-06-03T09:24:53.707Z"",""updated_at"":""2022-06-03T18:06:46.331Z"",""merged_by"":null,""merge_user"":null,""merged_at"":null,""closed_by"":null,""closed_at"":null,""target_branch"":""master"",""source_branch"":""updates_fo [...]
diff --git a/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests_for_mr_notes_test.csv b/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests_for_mr_notes_test.csv
index 539b25ea..fe38d410 100644
--- a/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests_for_mr_notes_test.csv
+++ b/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests_for_mr_notes_test.csv
@@ -1,4 +1,5 @@
 connection_id,gitlab_id,iid,project_id,source_project_id,target_project_id,state,title,web_url,user_notes_count,work_in_progress,source_branch,target_branch,merge_commit_sha,merged_at,gitlab_created_at,closed_at,merged_by_username,description,author_username,author_user_id,component,first_comment_time,review_rounds,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
+1,15869219,37,12345678,12345678,12345678,opened,Draft: Corrections for dbt 1,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/21,0,1,updates_for_dbt_1_1,master,,,2022-06-03T09:24:53.707+00:00,,,Closes https://gitlab.com/gitlab-data/analytics/-/issues/12941,paul_armstrong,5618371,,,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_requests,21,
 1,32348491,1,12345678,12345678,12345678,merged,"Resolve ""Add documentation to snowflake spend package""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/1,1,0,1-add-documentation-to-snowflake-spend-package,master,da1d6dea48f5972ffc683da6cff30934e7d6c52c,2019-06-28T14:32:06.192+00:00,2019-06-28T05:21:43.743+00:00,,tayloramurphy,Closes #1,emilie,2295562,,,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_requests,1,
 1,34300715,2,12345678,12345678,12345678,merged,"Resolve ""Handle multiple prices and date ranges""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/2,9,0,2-handle-multiple-prices-and-date-ranges,master,2fe82576fdbd0a43a2d5e02c17c6dc6ce3e188ee,2019-08-04T22:24:41.219+00:00,2019-08-01T21:36:45.020+00:00,,emilie,"Closes #2 
 
@@ -22,3 +23,9 @@ All models ran fine and the data looks great in my scratch schema!",tayloramurph
 
 * Upgrades to 0.17.0 format
 * Formatting changes to be in line with GitLab SQL Style Guide",tayloramurphy,1942272,,,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_requests,12,
+1,135772105,30,12345678,32935405,12345678,opened,Updates for dbt 1.0,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/19,1,0,updates_for_dbt_1.0,master,,,2022-01-18T19:59:30.723+00:00,,,"This MR sets up the repo for dbt 1.0
+A few configs were renamed.
+
+Could a new release be made for dbt 1.0?",johnj4,10663622,,,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_requests,19,
+1,145032495,46,12345678,34491818,12345678,closed,Draft: Update dbt_project.yml,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/20,0,1,PedramNavid-master-patch-20645,master,,,2022-03-15T03:07:06.077+00:00,2022-03-15T03:07:22.665+00:00,,,PedramNavid,9722492,,,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_requests,20,
+1,1149942101,29,12345678,29298577,12345678,opened,Add support for Snowpipe usage monitoring,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/18,0,0,master,master,,,2021-09-01T21:15:30.334+00:00,,,Add models and docs for Snowflake pipes (Snowpipe) usage monitoring based on the views in Snowflake Usage schema,gary-beautypie,9635687,,,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_requests,18,
diff --git a/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_comments.csv b/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_comments.csv
index 89ca62c1..66d01a64 100644
--- a/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_comments.csv
+++ b/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_comments.csv
@@ -1,4 +1,10 @@
 connection_id,gitlab_id,merge_request_id,merge_request_iid,body,author_username,author_user_id,gitlab_created_at,resolvable,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
+1,135100359,1149942101,29,approved this merge request,liyongfeng,3393147,2019-01-25T16:46:23.996+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,71,
+1,135223089,135772105,30,approved this merge request,liyongfeng,3393147,2019-01-26T11:41:34.158+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,126,
+1,135848627,15869219,37,approved this merge request,basicthinker,2436773,2019-01-29T00:40:37.158+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,169,
+1,135848646,15869219,37,unapproved this merge request,basicthinker,2436773,2019-01-29T00:40:45.520+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,170,
+1,135848654,15869219,37,approved this merge request,basicthinker,2436773,2019-01-29T00:40:47.455+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,171,
+1,137424744,145032495,46,approved this merge request,hackwaly,3014346,2019-02-01T11:43:54.686+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,151,
 1,186439132,32348491,1,"@tayloramurphy Once this is merged, let's make this a release version?",emilie,2295562,2019-06-28T10:56:46.646+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,7,
 1,208061122,35064956,3,@mg12 This looks good to me. Want me to merge?,emilie,2295562,2019-08-26T12:14:39.003+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,12,
 1,208092969,35064956,3,@emilie Let's do it!,martinguindon,3871284,2019-08-26T13:17:51.707+00:00,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,13,
diff --git a/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_notes.csv b/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_notes.csv
index 612057a1..6f21ad04 100644
--- a/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_notes.csv
+++ b/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_mr_notes.csv
@@ -1,4 +1,10 @@
 connection_id,gitlab_id,merge_request_id,merge_request_iid,noteable_type,author_username,body,gitlab_created_at,confidential,resolvable,is_system,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
+1,135100359,1149942101,29,MergeRequest,liyongfeng,approved this merge request,2019-01-25T16:46:23.996+00:00,0,0,1,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,71,
+1,135223089,135772105,30,MergeRequest,liyongfeng,approved this merge request,2019-01-26T11:41:34.158+00:00,0,0,1,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,126,
+1,135848627,15869219,37,MergeRequest,basicthinker,approved this merge request,2019-01-29T00:40:37.158+00:00,0,0,1,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,169,
+1,135848646,15869219,37,MergeRequest,basicthinker,unapproved this merge request,2019-01-29T00:40:45.520+00:00,0,0,1,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,170,
+1,135848654,15869219,37,MergeRequest,basicthinker,approved this merge request,2019-01-29T00:40:47.455+00:00,0,0,1,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,171,
+1,137424744,145032495,46,MergeRequest,hackwaly,approved this merge request,2019-02-01T11:43:54.686+00:00,0,0,1,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,151,
 1,186327072,32348491,1,MergeRequest,emilie,assigned to @emilie,2019-06-28T05:40:22.415+00:00,0,0,1,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,1,
 1,186327158,32348491,1,MergeRequest,emilie,"added 1 commit
 
diff --git a/plugins/gitlab/e2e/snapshot_tables/pull_request_comments.csv b/plugins/gitlab/e2e/snapshot_tables/pull_request_comments.csv
index 0970b3f4..a6258d0c 100644
--- a/plugins/gitlab/e2e/snapshot_tables/pull_request_comments.csv
+++ b/plugins/gitlab/e2e/snapshot_tables/pull_request_comments.csv
@@ -1,4 +1,10 @@
 id,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark,pull_request_id,body,user_id,created_date,commit_sha,position
+gitlab:GitlabMrComment:1:135100359,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,71,,gitlab:GitlabMergeRequest:1:1149942101,approved this merge request,gitlab:GitlabAccount:1:3393147,2019-01-25T16:46:23.996+00:00,,0
+gitlab:GitlabMrComment:1:135223089,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,126,,gitlab:GitlabMergeRequest:1:135772105,approved this merge request,gitlab:GitlabAccount:1:3393147,2019-01-26T11:41:34.158+00:00,,0
+gitlab:GitlabMrComment:1:135848627,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,169,,gitlab:GitlabMergeRequest:1:15869219,approved this merge request,gitlab:GitlabAccount:1:2436773,2019-01-29T00:40:37.158+00:00,,0
+gitlab:GitlabMrComment:1:135848646,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,170,,gitlab:GitlabMergeRequest:1:15869219,unapproved this merge request,gitlab:GitlabAccount:1:2436773,2019-01-29T00:40:45.520+00:00,,0
+gitlab:GitlabMrComment:1:135848654,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,171,,gitlab:GitlabMergeRequest:1:15869219,approved this merge request,gitlab:GitlabAccount:1:2436773,2019-01-29T00:40:47.455+00:00,,0
+gitlab:GitlabMrComment:1:137424744,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,151,,gitlab:GitlabMergeRequest:1:145032495,approved this merge request,gitlab:GitlabAccount:1:3014346,2019-02-01T11:43:54.686+00:00,,0
 gitlab:GitlabMrComment:1:186439132,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,7,,gitlab:GitlabMergeRequest:1:32348491,"@tayloramurphy Once this is merged, let's make this a release version?",gitlab:GitlabAccount:1:2295562,2019-06-28T10:56:46.646+00:00,,0
 gitlab:GitlabMrComment:1:208061122,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,12,,gitlab:GitlabMergeRequest:1:35064956,@mg12 This looks good to me. Want me to merge?,gitlab:GitlabAccount:1:2295562,2019-08-26T12:14:39.003+00:00,,0
 gitlab:GitlabMrComment:1:208092969,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_merge_request_notes,13,,gitlab:GitlabMergeRequest:1:35064956,@emilie Let's do it!,gitlab:GitlabAccount:1:3871284,2019-08-26T13:17:51.707+00:00,,0
diff --git a/plugins/gitlab/tasks/mr_comment_convertor.go b/plugins/gitlab/tasks/mr_comment_convertor.go
index b933ba12..7e7b0f79 100644
--- a/plugins/gitlab/tasks/mr_comment_convertor.go
+++ b/plugins/gitlab/tasks/mr_comment_convertor.go
@@ -78,8 +78,13 @@ func ConvertMergeRequestComment(taskCtx core.SubTaskContext) error {
 				UserId:        accountIdGen.Generate(data.Options.ConnectionId, gitlabComments.AuthorUserId),
 				CreatedDate:   gitlabComments.GitlabCreatedAt,
 			}
-
 			domainComment.Type = getStdCommentType(gitlabComments.Type)
+			if domainComment.Body == "unapproved this merge request" {
+				domainComment.Status = "CHANGES_REQUESTED"
+			}
+			if domainComment.Body == "approved this merge request" {
+				domainComment.Status = "APPROVED"
+			}
 			return []interface{}{
 				domainComment,
 			}, nil
diff --git a/plugins/gitlab/tasks/mr_note_extractor.go b/plugins/gitlab/tasks/mr_note_extractor.go
index fa330e9b..9d1d9cdd 100644
--- a/plugins/gitlab/tasks/mr_note_extractor.go
+++ b/plugins/gitlab/tasks/mr_note_extractor.go
@@ -67,7 +67,7 @@ func ExtractApiMergeRequestsNotes(taskCtx core.SubTaskContext) error {
 				return nil, err
 			}
 			results := make([]interface{}, 0, 2)
-			if !toolMrNote.IsSystem || (toolMrNote.IsSystem && toolMrNote.Body == "approved this merge request") {
+			if !toolMrNote.IsSystem || toolMrNote.Body == "approved this merge request" || toolMrNote.Body == "unapproved this merge request" {
 				toolMrComment := &models.GitlabMrComment{
 					GitlabId:        toolMrNote.GitlabId,
 					MergeRequestId:  toolMrNote.MergeRequestId,