From 0583086f7cd60b8d0d4aa8a5cf3c3932f5b9d37b Mon Sep 17 00:00:00 2001 From: abeizn Date: Fri, 19 Jan 2024 15:28:49 +0800 Subject: [PATCH] fix: gitlab type and severity (#6845) --- .../snapshot_tables/_tool_gitlab_issues.csv | 32 ++++++------- .../gitlab/e2e/snapshot_tables/issues.csv | 32 ++++++------- .../plugins/gitlab/tasks/issue_extractor.go | 45 ++----------------- 3 files changed, 36 insertions(+), 73 deletions(-) diff --git a/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_issues.csv b/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_issues.csv index afa7eacfeb3..0b80f5d9a6c 100644 --- a/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_issues.csv +++ b/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_issues.csv @@ -1,28 +1,28 @@ connection_id,gitlab_id,project_id,number,state,title,body,priority,type,status,assignee_id,assignee_name,creator_id,creator_name,lead_time_minutes,url,closed_at,gitlab_created_at,gitlab_updated_at,severity,component,time_estimate,total_time_spent,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark -1,22097949,12345678,1,closed,Add documentation to snowflake spend package,,,ISSUE,,2295562,emilie,2295562,emilie,11487,,2019-06-28T14:32:05.376+00:00,2019-06-20T15:04:58.946+00:00,2019-06-28T14:32:05.434+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,1, -1,23413488,12345678,2,closed,Handle multiple prices and date ranges,https://gitlab.com/gitlab-data/analytics/issues/2098,,"Data Team,Enhancement,Snowflake,dbt",,0,,1942272,tayloramurphy,4368,,2019-08-04T22:24:40.978+00:00,2019-08-01T21:36:28.766+00:00,2019-08-04T22:24:41.244+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,2, -1,23577209,12345678,3,opened,Expand package,I wonder how much more we can do with this https://www.tableau.com/about/blog/2019/5/monitor-understand-snowflake-account-usage,,"Analytics,Data Team,Enhancement,Snowflake,dbt",,0,,2295562,emilie,0,,,2019-08-07T13:52:40.231+00:00,2020-04-08T20:53:43.146+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,3, -1,23812433,12345678,4,closed,Config is not generic enough,Not everybody is going to have role reporter or schema analytics,,"Analytics,Data Team,Refactor,dbt",,0,,1942272,tayloramurphy,15823,,2019-08-26T15:37:49.678+00:00,2019-08-15T15:54:17.378+00:00,2019-08-26T15:37:49.718+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,4, +1,22097949,12345678,1,closed,Add documentation to snowflake spend package,,,ISSUE,,2295562,emilie,2295562,emilie,11487,,2019-06-28T14:32:05.376+00:00,2019-06-20T15:04:58.946+00:00,2019-06-28T14:32:05.434+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,1, +1,23413488,12345678,2,closed,Handle multiple prices and date ranges,https://gitlab.com/gitlab-data/analytics/issues/2098,,ISSUE,,0,,1942272,tayloramurphy,4368,,2019-08-04T22:24:40.978+00:00,2019-08-01T21:36:28.766+00:00,2019-08-04T22:24:41.244+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,2, +1,23577209,12345678,3,opened,Expand package,I wonder how much more we can do with this https://www.tableau.com/about/blog/2019/5/monitor-understand-snowflake-account-usage,,ISSUE,,0,,2295562,emilie,0,,,2019-08-07T13:52:40.231+00:00,2020-04-08T20:53:43.146+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,3, +1,23812433,12345678,4,closed,Config is not generic enough,Not everybody is going to have role reporter or schema analytics,,ISSUE,,0,,1942272,tayloramurphy,15823,,2019-08-26T15:37:49.678+00:00,2019-08-15T15:54:17.378+00:00,2019-08-26T15:37:49.718+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,4, 1,23816268,12345678,5,closed,Update README to include steps to resolve a potential dbt-utils conflict,"Depending on the main project configuration for packages, adding snowflake_spend may return an error about duplicate dbt-utils projects. -I'll update the README to include details and how to resolve it.",,ISSUE,,0,,3871284,martinguindon,15543,,2019-08-26T14:15:27.808+00:00,2019-08-15T19:11:30.169+00:00,2019-08-26T14:15:32.854+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,5, -1,24172103,12345678,6,closed,Document release process,,,"Analytics,Data Team,Enhancement,dbt",,5212782,m_walker,2295562,emilie,325745,,2020-04-08T20:52:10.973+00:00,2019-08-26T15:46:58.045+00:00,2020-04-08T20:52:11.010+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,6, -1,32460839,12345678,7,closed,Add sources and cleanup structure,,,"Data Team,Refactor,Snowflake",,2295562,emilie,1942272,tayloramurphy,18174,,2020-04-07T12:51:53.273+00:00,2020-03-25T21:56:57.084+00:00,2020-04-07T12:51:53.563+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,7, -1,32667832,12345678,8,closed,Add reviewer roulette to the package,https://gitlab.com/gitlab-org/gitlab/-/tree/master/danger/roulette,,ISSUE,,0,,2295562,emilie,166318,,2020-07-24T20:32:07.650+00:00,2020-03-31T08:33:30.240+00:00,2020-07-24T20:32:07.689+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,8, -1,33004486,12345678,9,closed,Make sure I can run locally the models,,,ISSUE,,4189780,mpeychet_,4189780,mpeychet_,155740,,2020-07-24T20:31:52.819+00:00,2020-04-07T16:50:58.253+00:00,2020-07-24T20:31:52.872+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,9, +I'll update the README to include details and how to resolve it.",,ISSUE,,0,,3871284,martinguindon,15543,,2019-08-26T14:15:27.808+00:00,2019-08-15T19:11:30.169+00:00,2019-08-26T14:15:32.854+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,5, +1,24172103,12345678,6,closed,Document release process,,,ISSUE,,5212782,m_walker,2295562,emilie,325745,,2020-04-08T20:52:10.973+00:00,2019-08-26T15:46:58.045+00:00,2020-04-08T20:52:11.010+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,6, +1,32460839,12345678,7,closed,Add sources and cleanup structure,,,ISSUE,,2295562,emilie,1942272,tayloramurphy,18174,,2020-04-07T12:51:53.273+00:00,2020-03-25T21:56:57.084+00:00,2020-04-07T12:51:53.563+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,7, +1,32667832,12345678,8,closed,Add reviewer roulette to the package,https://gitlab.com/gitlab-org/gitlab/-/tree/master/danger/roulette,,ISSUE,,0,,2295562,emilie,166318,,2020-07-24T20:32:07.650+00:00,2020-03-31T08:33:30.240+00:00,2020-07-24T20:32:07.689+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,8, +1,33004486,12345678,9,closed,Make sure I can run locally the models,,,ISSUE,,4189780,mpeychet_,4189780,mpeychet_,155740,,2020-07-24T20:31:52.819+00:00,2020-04-07T16:50:58.253+00:00,2020-07-24T20:31:52.872+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,9, 1,47175437,12345678,10,closed,Create alert for missing phone number and emergency contact in BambooHR,"Hi team, per this [issue](https://gitlab.com/gitlab-com/people-group/total-rewards/-/issues/140#note_362993437), can you please help us in creating an alert for missing phone numbers and emergency contacts. Regarding phone number, we only require 1 of the 3 fields filled out (Work Home, Home Phone, Mobile Phone). Is there a way to create an alert for this **only** if all 3 fields are missing info? -Thanks!",,ISSUE,,0,,4582589,julie.samson,29952,,2020-07-08T19:05:30.953+00:00,2020-06-17T23:52:31.133+00:00,2020-07-08T19:05:31.101+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,10, +Thanks!",,ISSUE,,0,,4582589,julie.samson,29952,,2020-07-08T19:05:30.953+00:00,2020-06-17T23:52:31.133+00:00,2020-07-08T19:05:31.101+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,10, 1,59444322,12345678,11,closed,Upgrade package for dbt 0.17,"Check: * dbt_project.yml new version -* packages",,"Data Team,Priority::3-Other,Refactor,To Do,dbt,workflow::4 - scheduled",,0,,1942272,tayloramurphy,13223,,2020-07-24T21:13:37.403+00:00,2020-07-15T16:49:44.079+00:00,2020-07-24T21:13:37.533+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,11, -1,69025114,12345678,12,closed,Mirror to GitHub,,,"Data Team,Documentation,Priority::3-Other,To Do,dbt,workflow::X - blocked",,0,,1942272,tayloramurphy,82548,,2020-09-22T22:08:20.103+00:00,2020-07-27T14:19:40.700+00:00,2020-09-22T22:08:20.280+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,12, +* packages",,ISSUE,,0,,1942272,tayloramurphy,13223,,2020-07-24T21:13:37.403+00:00,2020-07-15T16:49:44.079+00:00,2020-07-24T21:13:37.533+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,11, +1,69025114,12345678,12,closed,Mirror to GitHub,,,ISSUE,,0,,1942272,tayloramurphy,82548,,2020-09-22T22:08:20.103+00:00,2020-07-27T14:19:40.700+00:00,2020-09-22T22:08:20.280+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,12, 1,89051403,12345678,13,opened,The mirror at https://github.com/gitlabhq/snowflake_spend is managed with an expired personal access token,"Taylor Murphy indicated that the mirror from this repo to github may have been setup on his personal access token. This mirror exists so it will show up on hub.getdbt.com . We need somebody else to manage the mirror to github.com since Taylor's access is expired. -cc @gitlab-data/engineers",,ISSUE,,0,,5212782,m_walker,0,,,2021-06-21T19:30:40.087+00:00,2021-10-08T14:26:35.650+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,13, +cc @gitlab-data/engineers",,ISSUE,,0,,5212782,m_walker,0,,,2021-06-21T19:30:40.087+00:00,2021-10-08T14:26:35.650+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,13, 1,91069461,12345678,14,opened,packages.yml refers to a deprecated version of dbt_utils,"## Context fishtown-analytics/* packages have been renamed dbt-labs/* @@ -46,7 +46,7 @@ packages: revision: v1.2.0 - package: dbt-labs/dbt_external_tables version: 0.7.0 -```",,ISSUE,,0,,6214107,loicchesneau,0,,,2021-07-29T07:58:08.871+00:00,2022-05-02T20:24:23.772+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,14, +```",,ISSUE,,0,,6214107,loicchesneau,0,,,2021-07-29T07:58:08.871+00:00,2022-05-02T20:24:23.772+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,14, 1,106802088,12345678,15,opened,Getting issues and warning upgrading the new dbt version 1.0.4,"## Context Upgrade DBT version 1.0.4 @@ -103,9 +103,9 @@ The `source-paths` config has been renamed to `model-paths`. Please update your The `data-paths` config has been renamed to `seed-paths`. Please update your `dbt_project.yml` configuration to reflect this change. 22:42:59 Encountered an error: -Found duplicate project ""dbt_utils"". This occurs when a dependency has the same project name as some other dependency.",,ISSUE,,0,,11386488,gerardoparticle,0,,,2022-04-19T00:16:22.360+00:00,2022-04-19T00:16:22.360+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,15, +Found duplicate project ""dbt_utils"". This occurs when a dependency has the same project name as some other dependency.",,ISSUE,,0,,11386488,gerardoparticle,0,,,2022-04-19T00:16:22.360+00:00,2022-04-19T00:16:22.360+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,15, 1,108497826,12345678,16,closed,Release new snowplow spend package,"I've been contacted by Doug Beatty from dbt labs regarding the open PR on out GitHub repo [here](https://github.com/gitlabhq/snowflake_spend/pull/2) This is a synched repo to the GitLab version [here](https://gitlab.com/gitlab-data/snowflake_spend/-/blob/master/packages.yml) where the change has already been made. -I think the issue is that the tag wasn't applied to release this as a version. Release instructions [here](https://gitlab.com/gitlab-data/snowflake_spend/-/tree/master/#how-this-package-gets-released-for-maintainers-only).",,"Champion::Data Team,Priority::3-Other,Team::R&D,workflow::5 - development",,9386100,chrissharp,9386100,chrissharp,49408,,2022-06-16T16:23:09.759+00:00,2022-05-13T08:54:58.859+00:00,2022-06-16T16:23:09.779+00:00,,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,16, +I think the issue is that the tag wasn't applied to release this as a version. Release instructions [here](https://gitlab.com/gitlab-data/snowflake_spend/-/tree/master/#how-this-package-gets-released-for-maintainers-only).",,ISSUE,,9386100,chrissharp,9386100,chrissharp,49408,,2022-06-16T16:23:09.759+00:00,2022-05-13T08:54:58.859+00:00,2022-06-16T16:23:09.779+00:00,UNKNOWN,,0,0,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,16, diff --git a/backend/plugins/gitlab/e2e/snapshot_tables/issues.csv b/backend/plugins/gitlab/e2e/snapshot_tables/issues.csv index f13568f270d..ea47777d42f 100644 --- a/backend/plugins/gitlab/e2e/snapshot_tables/issues.csv +++ b/backend/plugins/gitlab/e2e/snapshot_tables/issues.csv @@ -55,36 +55,36 @@ The `source-paths` config has been renamed to `model-paths`. Please update your The `data-paths` config has been renamed to `seed-paths`. Please update your `dbt_project.yml` configuration to reflect this change. 22:42:59 Encountered an error: -Found duplicate project ""dbt_utils"". This occurs when a dependency has the same project name as some other dependency.",,,TODO,,0,,2022-04-19T00:16:22.360+00:00,2022-04-19T00:16:22.360+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:11386488,gitlab:GitlabAccount:1:0,,,,,gerardoparticle,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,15, +Found duplicate project ""dbt_utils"". This occurs when a dependency has the same project name as some other dependency.",,,TODO,,0,,2022-04-19T00:16:22.360+00:00,2022-04-19T00:16:22.360+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:11386488,gitlab:GitlabAccount:1:0,,UNKNOWN,,,gerardoparticle,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,15, gitlab:GitlabIssue:1:108497826,,16,Release new snowplow spend package,"I've been contacted by Doug Beatty from dbt labs regarding the open PR on out GitHub repo [here](https://github.com/gitlabhq/snowflake_spend/pull/2) This is a synched repo to the GitLab version [here](https://gitlab.com/gitlab-data/snowflake_spend/-/blob/master/packages.yml) where the change has already been made. -I think the issue is that the tag wasn't applied to release this as a version. Release instructions [here](https://gitlab.com/gitlab-data/snowflake_spend/-/tree/master/#how-this-package-gets-released-for-maintainers-only).",,,DONE,,0,2022-06-16T16:23:09.759+00:00,2022-05-13T08:54:58.859+00:00,2022-06-16T16:23:09.779+00:00,49408,,,0,0,0,gitlab:GitlabAccount:1:9386100,gitlab:GitlabAccount:1:9386100,chrissharp,,,,chrissharp,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,16, -gitlab:GitlabIssue:1:22097949,,1,Add documentation to snowflake spend package,,,,DONE,,0,2019-06-28T14:32:05.376+00:00,2019-06-20T15:04:58.946+00:00,2019-06-28T14:32:05.434+00:00,11487,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:2295562,emilie,,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,1, -gitlab:GitlabIssue:1:23413488,,2,Handle multiple prices and date ranges,https://gitlab.com/gitlab-data/analytics/issues/2098,,,DONE,,0,2019-08-04T22:24:40.978+00:00,2019-08-01T21:36:28.766+00:00,2019-08-04T22:24:41.244+00:00,4368,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,2, -gitlab:GitlabIssue:1:23577209,,3,Expand package,I wonder how much more we can do with this https://www.tableau.com/about/blog/2019/5/monitor-understand-snowflake-account-usage,,,TODO,,0,,2019-08-07T13:52:40.231+00:00,2020-04-08T20:53:43.146+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:0,,,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,3, -gitlab:GitlabIssue:1:23812433,,4,Config is not generic enough,Not everybody is going to have role reporter or schema analytics,,,DONE,,0,2019-08-26T15:37:49.678+00:00,2019-08-15T15:54:17.378+00:00,2019-08-26T15:37:49.718+00:00,15823,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,4, +I think the issue is that the tag wasn't applied to release this as a version. Release instructions [here](https://gitlab.com/gitlab-data/snowflake_spend/-/tree/master/#how-this-package-gets-released-for-maintainers-only).",,,DONE,,0,2022-06-16T16:23:09.759+00:00,2022-05-13T08:54:58.859+00:00,2022-06-16T16:23:09.779+00:00,49408,,,0,0,0,gitlab:GitlabAccount:1:9386100,gitlab:GitlabAccount:1:9386100,chrissharp,UNKNOWN,,,chrissharp,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,16, +gitlab:GitlabIssue:1:22097949,,1,Add documentation to snowflake spend package,,,,DONE,,0,2019-06-28T14:32:05.376+00:00,2019-06-20T15:04:58.946+00:00,2019-06-28T14:32:05.434+00:00,11487,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:2295562,emilie,UNKNOWN,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,1, +gitlab:GitlabIssue:1:23413488,,2,Handle multiple prices and date ranges,https://gitlab.com/gitlab-data/analytics/issues/2098,,,DONE,,0,2019-08-04T22:24:40.978+00:00,2019-08-01T21:36:28.766+00:00,2019-08-04T22:24:41.244+00:00,4368,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,UNKNOWN,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,2, +gitlab:GitlabIssue:1:23577209,,3,Expand package,I wonder how much more we can do with this https://www.tableau.com/about/blog/2019/5/monitor-understand-snowflake-account-usage,,,TODO,,0,,2019-08-07T13:52:40.231+00:00,2020-04-08T20:53:43.146+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:0,,UNKNOWN,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,3, +gitlab:GitlabIssue:1:23812433,,4,Config is not generic enough,Not everybody is going to have role reporter or schema analytics,,,DONE,,0,2019-08-26T15:37:49.678+00:00,2019-08-15T15:54:17.378+00:00,2019-08-26T15:37:49.718+00:00,15823,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,UNKNOWN,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,4, gitlab:GitlabIssue:1:23816268,,5,Update README to include steps to resolve a potential dbt-utils conflict,"Depending on the main project configuration for packages, adding snowflake_spend may return an error about duplicate dbt-utils projects. -I'll update the README to include details and how to resolve it.",,,DONE,,0,2019-08-26T14:15:27.808+00:00,2019-08-15T19:11:30.169+00:00,2019-08-26T14:15:32.854+00:00,15543,,,0,0,0,gitlab:GitlabAccount:1:3871284,gitlab:GitlabAccount:1:0,,,,,martinguindon,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,5, -gitlab:GitlabIssue:1:24172103,,6,Document release process,,,,DONE,,0,2020-04-08T20:52:10.973+00:00,2019-08-26T15:46:58.045+00:00,2020-04-08T20:52:11.010+00:00,325745,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:5212782,m_walker,,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,6, -gitlab:GitlabIssue:1:32460839,,7,Add sources and cleanup structure,,,,DONE,,0,2020-04-07T12:51:53.273+00:00,2020-03-25T21:56:57.084+00:00,2020-04-07T12:51:53.563+00:00,18174,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:2295562,emilie,,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,7, -gitlab:GitlabIssue:1:32667832,,8,Add reviewer roulette to the package,https://gitlab.com/gitlab-org/gitlab/-/tree/master/danger/roulette,,,DONE,,0,2020-07-24T20:32:07.650+00:00,2020-03-31T08:33:30.240+00:00,2020-07-24T20:32:07.689+00:00,166318,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:0,,,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,8, -gitlab:GitlabIssue:1:33004486,,9,Make sure I can run locally the models,,,,DONE,,0,2020-07-24T20:31:52.819+00:00,2020-04-07T16:50:58.253+00:00,2020-07-24T20:31:52.872+00:00,155740,,,0,0,0,gitlab:GitlabAccount:1:4189780,gitlab:GitlabAccount:1:4189780,mpeychet_,,,,mpeychet_,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,9, +I'll update the README to include details and how to resolve it.",,,DONE,,0,2019-08-26T14:15:27.808+00:00,2019-08-15T19:11:30.169+00:00,2019-08-26T14:15:32.854+00:00,15543,,,0,0,0,gitlab:GitlabAccount:1:3871284,gitlab:GitlabAccount:1:0,,UNKNOWN,,,martinguindon,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,5, +gitlab:GitlabIssue:1:24172103,,6,Document release process,,,,DONE,,0,2020-04-08T20:52:10.973+00:00,2019-08-26T15:46:58.045+00:00,2020-04-08T20:52:11.010+00:00,325745,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:5212782,m_walker,UNKNOWN,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,6, +gitlab:GitlabIssue:1:32460839,,7,Add sources and cleanup structure,,,,DONE,,0,2020-04-07T12:51:53.273+00:00,2020-03-25T21:56:57.084+00:00,2020-04-07T12:51:53.563+00:00,18174,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:2295562,emilie,UNKNOWN,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,7, +gitlab:GitlabIssue:1:32667832,,8,Add reviewer roulette to the package,https://gitlab.com/gitlab-org/gitlab/-/tree/master/danger/roulette,,,DONE,,0,2020-07-24T20:32:07.650+00:00,2020-03-31T08:33:30.240+00:00,2020-07-24T20:32:07.689+00:00,166318,,,0,0,0,gitlab:GitlabAccount:1:2295562,gitlab:GitlabAccount:1:0,,UNKNOWN,,,emilie,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,8, +gitlab:GitlabIssue:1:33004486,,9,Make sure I can run locally the models,,,,DONE,,0,2020-07-24T20:31:52.819+00:00,2020-04-07T16:50:58.253+00:00,2020-07-24T20:31:52.872+00:00,155740,,,0,0,0,gitlab:GitlabAccount:1:4189780,gitlab:GitlabAccount:1:4189780,mpeychet_,UNKNOWN,,,mpeychet_,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,9, gitlab:GitlabIssue:1:47175437,,10,Create alert for missing phone number and emergency contact in BambooHR,"Hi team, per this [issue](https://gitlab.com/gitlab-com/people-group/total-rewards/-/issues/140#note_362993437), can you please help us in creating an alert for missing phone numbers and emergency contacts. Regarding phone number, we only require 1 of the 3 fields filled out (Work Home, Home Phone, Mobile Phone). Is there a way to create an alert for this **only** if all 3 fields are missing info? -Thanks!",,,DONE,,0,2020-07-08T19:05:30.953+00:00,2020-06-17T23:52:31.133+00:00,2020-07-08T19:05:31.101+00:00,29952,,,0,0,0,gitlab:GitlabAccount:1:4582589,gitlab:GitlabAccount:1:0,,,,,julie.samson,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,10, +Thanks!",,,DONE,,0,2020-07-08T19:05:30.953+00:00,2020-06-17T23:52:31.133+00:00,2020-07-08T19:05:31.101+00:00,29952,,,0,0,0,gitlab:GitlabAccount:1:4582589,gitlab:GitlabAccount:1:0,,UNKNOWN,,,julie.samson,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,10, gitlab:GitlabIssue:1:59444322,,11,Upgrade package for dbt 0.17,"Check: * dbt_project.yml new version -* packages",,,DONE,,0,2020-07-24T21:13:37.403+00:00,2020-07-15T16:49:44.079+00:00,2020-07-24T21:13:37.533+00:00,13223,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,11, -gitlab:GitlabIssue:1:69025114,,12,Mirror to GitHub,,,,DONE,,0,2020-09-22T22:08:20.103+00:00,2020-07-27T14:19:40.700+00:00,2020-09-22T22:08:20.280+00:00,82548,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,12, +* packages",,,DONE,,0,2020-07-24T21:13:37.403+00:00,2020-07-15T16:49:44.079+00:00,2020-07-24T21:13:37.533+00:00,13223,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,UNKNOWN,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,11, +gitlab:GitlabIssue:1:69025114,,12,Mirror to GitHub,,,,DONE,,0,2020-09-22T22:08:20.103+00:00,2020-07-27T14:19:40.700+00:00,2020-09-22T22:08:20.280+00:00,82548,,,0,0,0,gitlab:GitlabAccount:1:1942272,gitlab:GitlabAccount:1:0,,UNKNOWN,,,tayloramurphy,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,12, gitlab:GitlabIssue:1:89051403,,13,The mirror at https://github.com/gitlabhq/snowflake_spend is managed with an expired personal access token,"Taylor Murphy indicated that the mirror from this repo to github may have been setup on his personal access token. This mirror exists so it will show up on hub.getdbt.com . We need somebody else to manage the mirror to github.com since Taylor's access is expired. -cc @gitlab-data/engineers",,,TODO,,0,,2021-06-21T19:30:40.087+00:00,2021-10-08T14:26:35.650+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:5212782,gitlab:GitlabAccount:1:0,,,,,m_walker,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,13, +cc @gitlab-data/engineers",,,TODO,,0,,2021-06-21T19:30:40.087+00:00,2021-10-08T14:26:35.650+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:5212782,gitlab:GitlabAccount:1:0,,UNKNOWN,,,m_walker,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,13, gitlab:GitlabIssue:1:91069461,,14,packages.yml refers to a deprecated version of dbt_utils,"## Context fishtown-analytics/* packages have been renamed dbt-labs/* @@ -108,4 +108,4 @@ packages: revision: v1.2.0 - package: dbt-labs/dbt_external_tables version: 0.7.0 -```",,,TODO,,0,,2021-07-29T07:58:08.871+00:00,2022-05-02T20:24:23.772+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:6214107,gitlab:GitlabAccount:1:0,,,,,loicchesneau,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,14, +```",,,TODO,,0,,2021-07-29T07:58:08.871+00:00,2022-05-02T20:24:23.772+00:00,0,,,0,0,0,gitlab:GitlabAccount:1:6214107,gitlab:GitlabAccount:1:0,,UNKNOWN,,,loicchesneau,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_issues,14, diff --git a/backend/plugins/gitlab/tasks/issue_extractor.go b/backend/plugins/gitlab/tasks/issue_extractor.go index 758180b5fce..b3bd133f57b 100644 --- a/backend/plugins/gitlab/tasks/issue_extractor.go +++ b/backend/plugins/gitlab/tasks/issue_extractor.go @@ -20,11 +20,9 @@ package tasks import ( "encoding/json" "regexp" - "strings" "github.com/apache/incubator-devlake/core/errors" "github.com/apache/incubator-devlake/core/models/common" - "github.com/apache/incubator-devlake/core/models/domainlayer/ticket" "github.com/apache/incubator-devlake/core/plugin" "github.com/apache/incubator-devlake/helpers/pluginhelper/api" "github.com/apache/incubator-devlake/plugins/gitlab/models" @@ -120,7 +118,7 @@ type IssuesResponse struct { Confidential bool DiscussionLocked bool IssueType string - Serverity string + Severity string Component string Priority string Links struct { @@ -141,9 +139,7 @@ func ExtractApiIssues(taskCtx plugin.SubTaskContext) errors.Error { var issueSeverityRegex *regexp.Regexp var issueComponentRegex *regexp.Regexp var issuePriorityRegex *regexp.Regexp - var issueTypeBugRegex *regexp.Regexp - var issueTypeRequirementRegex *regexp.Regexp - var issueTypeIncidentRegex *regexp.Regexp + var issueSeverity = config.IssueSeverity var err error if len(issueSeverity) > 0 { @@ -166,27 +162,6 @@ func ExtractApiIssues(taskCtx plugin.SubTaskContext) errors.Error { return errors.Default.Wrap(err, "regexp Compile issuePriority failed") } } - var issueTypeBug = config.IssueTypeBug - if len(issueTypeBug) > 0 { - issueTypeBugRegex, err = regexp.Compile(issueTypeBug) - if err != nil { - return errors.Default.Wrap(err, "regexp Compile issueTypeBug failed") - } - } - var issueTypeRequirement = config.IssueTypeRequirement - if len(issueTypeRequirement) > 0 { - issueTypeRequirementRegex, err = regexp.Compile(issueTypeRequirement) - if err != nil { - return errors.Default.Wrap(err, "regexp Compile issueTypeRequirement failed") - } - } - var issueTypeIncident = config.IssueTypeIncident - if len(issueTypeIncident) > 0 { - issueTypeIncidentRegex, err = regexp.Compile(issueTypeIncident) - if err != nil { - return errors.Default.Wrap(err, "regexp Compile issueTypeIncident failed") - } - } extractor, err := api.NewApiExtractor(api.ApiExtractorArgs{ RawDataSubTaskArgs: *rawDataSubTaskArgs, Extract: func(row *api.RawData) ([]interface{}, errors.Error) { @@ -205,7 +180,6 @@ func ExtractApiIssues(taskCtx plugin.SubTaskContext) errors.Error { if err != nil { return nil, err } - var joinedLabels []string for _, label := range body.Labels { results = append(results, &models.GitlabIssueLabel{ IssueId: gitlabIssue.GitlabId, @@ -221,18 +195,6 @@ func ExtractApiIssues(taskCtx plugin.SubTaskContext) errors.Error { if issuePriorityRegex != nil && issuePriorityRegex.MatchString(label) { gitlabIssue.Priority = label } - - if issueTypeRequirementRegex != nil && issueTypeRequirementRegex.MatchString(label) { - gitlabIssue.StdType = ticket.REQUIREMENT - } else if issueTypeBugRegex != nil && issueTypeBugRegex.MatchString(label) { - gitlabIssue.StdType = ticket.BUG - } else if issueTypeIncidentRegex != nil && issueTypeIncidentRegex.MatchString(label) { - gitlabIssue.StdType = ticket.INCIDENT - } - joinedLabels = append(joinedLabels, label) - } - if len(joinedLabels) > 0 { - gitlabIssue.Type = strings.Join(joinedLabels, ",") } gitlabIssue.ConnectionId = data.Options.ConnectionId @@ -282,7 +244,8 @@ func convertGitlabIssue(issue *IssuesResponse, projectId int) (*models.GitlabIss Number: issue.Iid, State: issue.State, Type: issue.Type, - Severity: issue.Serverity, + StdType: issue.Type, + Severity: issue.Severity, Component: issue.Component, Priority: issue.Priority, Title: issue.Title,