This is an automated email from the ASF dual-hosted git repository.
klesh 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 d15c46974 fix: fix gitlab commit sha (#5566)
d15c46974 is described below
commit d15c46974d3a87bc0d40a18b278997e1c5793682
Author: mappjzc <[email protected]>
AuthorDate: Mon Jun 26 11:08:16 2023 +0800
fix: fix gitlab commit sha (#5566)
Fix gitlab Commit Sha for #5501
Nddtfjiang <[email protected]>
---
.../_tool_gitlab_merge_requests.csv | 39 +++++++++---------
.../gitlab/e2e/snapshot_tables/pull_requests.csv | 16 ++++----
.../{register.go => 20230625_add_mr_commitsha.go} | 48 ++++++++++++++--------
.../gitlab/models/migrationscripts/register.go | 1 +
4 files changed, 60 insertions(+), 44 deletions(-)
diff --git
a/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests.csv
b/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests.csv
index 23b131914..86d60bc2c 100644
--- a/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests.csv
+++ b/backend/plugins/gitlab/e2e/snapshot_tables/_tool_gitlab_merge_requests.csv
@@ -1,25 +1,26 @@
-connection_id,gitlab_id,iid,project_id,source_project_id,target_project_id,state,title,web_url,user_notes_count,work_in_progress,is_detail_required,source_branch,target_branch,merge_commit_sha,merged_at,gitlab_created_at,gitlab_updated_at,closed_at,type,merged_by_username,description,author_username,author_user_id,component,first_comment_time,review_rounds
-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,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,2019-06-28T14:32:05.270+00:00,,,tayloramurphy,Closes
#1,emilie,2295562,,,0
-1,35064956,3,12345678,13835497,12345678,merged,Update README to include steps
to resolve a potential dbt-utils
conflict,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/3,3,0,0,5-update-readme-to-include-steps-to-resolve-a-potential-dbt-utils-conflict,master,d678bea9d47b42eb13512d1c9d6a592d80b432d4,2019-08-26T14:15:27.922+00:00,2019-08-15T19:34:32.706+00:00,2019-08-26T14:15:27.845+00:00,,,emilie,Closes
#5,martinguindon,3871284,,,0
-1,35841926,4,12345678,12345678,12345678,merged,"Resolve ""Config is not
generic
enough""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/4,0,0,0,4-config-is-not-generic-enough,master,e95b5db25e15a38e21d11cb45cc21bf17d5c407c,2019-08-26T15:37:50.105+00:00,2019-08-26T15:32:49.557+00:00,2019-08-26T15:37:49.575+00:00,,,emilie,Closes
#4,emilie,2295562,,,0
-1,53445063,5,12345678,15706315,12345678,merged,Issue 3 Base
model,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/5,20,0,0,issue_3,master,f2ee4cf121a328ce39723506dc18e4661941971a,2020-03-25T18:36:45.801+00:00,2020-03-24T12:46:15.891+00:00,2020-03-25T18:36:45.303+00:00,,,tayloramurphy,,nehiljain,783199,,,0
-1,53627854,6,12345678,15706063,12345678,merged,Update schema.yml typo in
docs,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/6,0,0,0,patch-1,master,12dcc23a45adce0b12f8687438ec3a28274c7c30,2020-03-25T19:04:19.844+00:00,2020-03-25T19:02:16.747+00:00,2020-03-25T19:04:32.235+00:00,,,tayloramurphy,,nehiljain,783199,,,0
-1,55146687,8,12345678,12345678,12345678,merged,"Resolve ""Document release
process""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/8,3,0,0,6-document-release-process,master,7c8245a3a5eda7f502737940aaf7944d99c58f2e,2020-04-08T20:52:11.150+00:00,2020-04-08T20:07:10.223+00:00,2020-04-08T20:52:10.945+00:00,,,emilie,Closes
#6,m_walker,5212782,,,0
-1,55146787,9,12345678,15706315,12345678,opened,Issue 3: Transformed model for
query
performance,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/9,14,0,0,issue_3,master,,,2020-04-08T20:09:08.130+00:00,2020-06-29T15:47:04.785+00:00,,,,,nehiljain,783199,,,0
-1,58311001,10,12345678,12345678,12345678,merged,Update version in
readme,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/10,0,0,0,emilie-master-patch-23079,master,66c0f1de49a0c876b8f93e8e0dce3327e766f59d,2020-05-11T17:09:20.603+00:00,2020-05-11T17:09:12.265+00:00,2020-05-11T17:09:20.565+00:00,,,emilie,,emilie,2295562,,,0
-1,62519057,11,12345678,19569570,12345678,opened,Clustering metering
models,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/11,0,0,0,clustering-metering,master,,,2020-06-24T12:34:04.792+00:00,2020-06-24T12:35:01.115+00:00,,,,,jainnehil,842680,,,0
-1,65505080,12,12345678,12345678,12345678,merged,"Resolve ""Upgrade package for
dbt
0.17""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/12,0,0,0,11-upgrade-package-for-dbt-0-17,master,9bfc136eb90802c2ce59956c34dde01bb3de0d50,2020-07-24T21:13:35.321+00:00,2020-07-24T17:47:08.238+00:00,2020-07-24T21:13:34.907+00:00,,,tayloramurphy,"Closes
#11
+connection_id,gitlab_id,iid,project_id,source_project_id,target_project_id,state,title,web_url,user_notes_count,work_in_progress,is_detail_required,source_branch,target_branch,merge_commit_sha,squash_commit_sha,diff_head_sha,merged_at,gitlab_created_at,gitlab_updated_at,closed_at,type,merged_by_username,description,author_username,author_user_id,component,first_comment_time,review_rounds
+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,0,1-add-documentation-to-snowflake-spend-package,master,da1d6dea48f5972ffc683da6cff30934e7d6c52c,,ad25fcda15e310a7eb34b3e38ff9b962b54f0e03,2019-06-28T14:32:06.192+00:00,2019-06-28T05:21:43.743+00:00,2019-06-28T14:32:05.270+00:00,,,tayloramurphy,Closes
#1,emilie,2295562,,,0
+1,35064956,3,12345678,13835497,12345678,merged,Update README to include steps
to resolve a potential dbt-utils
conflict,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/3,3,0,0,5-update-readme-to-include-steps-to-resolve-a-potential-dbt-utils-conflict,master,d678bea9d47b42eb13512d1c9d6a592d80b432d4,,083864201849f6707a34d24e61c43638696f95a6,2019-08-26T14:15:27.922+00:00,2019-08-15T19:34:32.706+00:00,2019-08-26T14:15:27.845+00:00,,,emilie,Closes
#5,martinguindon,3871284,,,0
+1,35841926,4,12345678,12345678,12345678,merged,"Resolve ""Config is not
generic
enough""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/4,0,0,0,4-config-is-not-generic-enough,master,e95b5db25e15a38e21d11cb45cc21bf17d5c407c,,91e5666bdfe90e5ada3e65aaa9240b2b0b1a072f,2019-08-26T15:37:50.105+00:00,2019-08-26T15:32:49.557+00:00,2019-08-26T15:37:49.575+00:00,,,emilie,Closes
#4,emilie,2295562,,,0
+1,53445063,5,12345678,15706315,12345678,merged,Issue 3 Base
model,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/5,20,0,0,issue_3,master,f2ee4cf121a328ce39723506dc18e4661941971a,,9ef8183140bae8c39a440d9c7eb47f3bc7dcab75,2020-03-25T18:36:45.801+00:00,2020-03-24T12:46:15.891+00:00,2020-03-25T18:36:45.303+00:00,,,tayloramurphy,,nehiljain,783199,,,0
+1,53627854,6,12345678,15706063,12345678,merged,Update schema.yml typo in
docs,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/6,0,0,0,patch-1,master,12dcc23a45adce0b12f8687438ec3a28274c7c30,,553f7613b178301da4075202afe91ebda5d97ab5,2020-03-25T19:04:19.844+00:00,2020-03-25T19:02:16.747+00:00,2020-03-25T19:04:32.235+00:00,,,tayloramurphy,,nehiljain,783199,,,0
+1,55146687,8,12345678,12345678,12345678,merged,"Resolve ""Document release
process""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/8,3,0,0,6-document-release-process,master,7c8245a3a5eda7f502737940aaf7944d99c58f2e,,59288acac87666b52daea68b3393d3d86f1abb25,2020-04-08T20:52:11.150+00:00,2020-04-08T20:07:10.223+00:00,2020-04-08T20:52:10.945+00:00,,,emilie,Closes
#6,m_walker,5212782,,,0
+1,55146787,9,12345678,15706315,12345678,opened,Issue 3: Transformed model for
query
performance,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/9,14,0,0,issue_3,master,,,8fc1f7e0d4c08b76764ff87d6d40fc0c3b37d6b4,,2020-04-08T20:09:08.130+00:00,2020-06-29T15:47:04.785+00:00,,,,,nehiljain,783199,,,0
+1,58311001,10,12345678,12345678,12345678,merged,Update version in
readme,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/10,0,0,0,emilie-master-patch-23079,master,66c0f1de49a0c876b8f93e8e0dce3327e766f59d,,8e551153bb4a86f7d611cf3f8459a9dc25b59ee6,2020-05-11T17:09:20.603+00:00,2020-05-11T17:09:12.265+00:00,2020-05-11T17:09:20.565+00:00,,,emilie,,emilie,2295562,,,0
+1,62519057,11,12345678,19569570,12345678,opened,Clustering metering
models,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/11,0,0,0,clustering-metering,master,,,8d7c748e10e8d35c3d0157c8fdd5b1b73e52132b,,2020-06-24T12:34:04.792+00:00,2020-06-24T12:35:01.115+00:00,,,,,jainnehil,842680,,,0
+1,65505080,12,12345678,12345678,12345678,merged,"Resolve ""Upgrade package for
dbt
0.17""",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/12,0,0,0,11-upgrade-package-for-dbt-0-17,master,9bfc136eb90802c2ce59956c34dde01bb3de0d50,,5948da3e11a972ff3fbd27e603e60f69e2107afa,2020-07-24T21:13:35.321+00:00,2020-07-24T17:47:08.238+00:00,2020-07-24T21:13:34.907+00:00,,,tayloramurphy,"Closes
#11
* Upgrades to 0.17.0 format
* Formatting changes to be in line with GitLab SQL Style
Guide",tayloramurphy,1942272,,,0
-1,68978485,13,12345678,15706315,12345678,closed,Include more snowflake qrt
columns,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/13,0,0,0,include_more_snowflake_qrt_columns,master,1cfe7c21c8726d8fda037d7ad26a16faacfe65b4,,2020-08-27T20:17:01.825+00:00,2020-08-27T20:20:08.131+00:00,2020-08-27T20:20:08.150+00:00,,,,aianus,2478227,,,0
-1,89243644,14,12345678,24539973,12345678,merged,Update README.md to use the
newest version as an
example,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/14,0,0,0,ThomasLaPiana-master-patch-93997,master,21840a7eadb58babe8aeae2960da851a3ed00ddc,2021-02-19T20:13:05.969+00:00,2021-02-19T20:12:14.302+00:00,2021-02-19T20:13:05.913+00:00,,,tayloramurphy,Update
README.md to use the newest version as an example. The old version doesn't
work with the current version of dbt,ThomasLa [...]
-1,110817220,16,12345678,28584714,12345678,merged,Update packages.yml to point
to dbt-labs instead of
fishtown,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/16,5,0,0,GJMcClintock-master-patch-24867,master,6f45b467c478df1c67d19cf6d4cbb8e05a710662,2021-08-12T06:12:54.329+00:00,2021-08-03T15:02:54.955+00:00,2021-10-04T16:23:41.057+00:00,,,vedprakash2021,With
the company name change the old repo is deprecated.,GJMcClintock,9439881,,,0
-1,111383524,17,12345678,0,12345678,closed,The package name changed ->
https://hub.getdbt.com/dbt-labs/dbt_utils/latest/,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/17,1,0,0,swiffer-master-patch-77533,master,,,2021-08-07T06:50:25.458+00:00,2021-08-07T06:51:14.916+00:00,2021-08-07T06:51:14.933+00:00,,,,swiffer,156402,,,0
-1,114994501,18,12345678,29298577,12345678,opened,Add support for Snowpipe
usage
monitoring,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/18,0,0,0,master,master,,,2021-09-01T21:15:30.334+00:00,2022-06-30T21:41:49.705+00:00,,,,Add
models and docs for Snowflake pipes (Snowpipe) usage monitoring based on the
views in Snowflake Usage schema,gary-beautypie,9635687,,,0
-1,135775405,19,12345678,32935405,12345678,opened,Updates for dbt
1.0,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/19,1,0,0,updates_for_dbt_1.0,master,,,2022-01-18T19:59:30.723+00:00,2022-02-10T14:13:47.663+00:00,,,,"This
MR sets up the repo for dbt 1.0
+1,68978485,13,12345678,15706315,12345678,closed,Include more snowflake qrt
columns,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/13,0,0,0,include_more_snowflake_qrt_columns,master,,,1cfe7c21c8726d8fda037d7ad26a16faacfe65b4,,2020-08-27T20:17:01.825+00:00,2020-08-27T20:20:08.131+00:00,2020-08-27T20:20:08.150+00:00,,,,aianus,2478227,,,0
+1,89243644,14,12345678,24539973,12345678,merged,Update README.md to use the
newest version as an
example,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/14,0,0,0,ThomasLaPiana-master-patch-93997,master,21840a7eadb58babe8aeae2960da851a3ed00ddc,7f928f936c58b2e001f86d07b1f7b9411413e439,7f928f936c58b2e001f86d07b1f7b9411413e439,2021-02-19T20:13:05.969+00:00,2021-02-19T20:12:14.302+00:00,2021-02-19T20:13:05.913+00:00,,,tayloramurphy,Update
README.md to use the newest version as [...]
+1,110817220,16,12345678,28584714,12345678,merged,Update packages.yml to point
to dbt-labs instead of
fishtown,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/16,5,0,0,GJMcClintock-master-patch-24867,master,6f45b467c478df1c67d19cf6d4cbb8e05a710662,,6c70820c6f06a87619e5d1ddc8cd88ff01b5521c,2021-08-12T06:12:54.329+00:00,2021-08-03T15:02:54.955+00:00,2021-10-04T16:23:41.057+00:00,,,vedprakash2021,With
the company name change the old repo is deprecated.,GJMcClintock,9439881,,,0
+1,111383524,17,12345678,0,12345678,closed,The package name changed ->
https://hub.getdbt.com/dbt-labs/dbt_utils/latest/,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/17,1,0,0,swiffer-master-patch-77533,master,,,598ce24f1174d80556dd4432bfdcdce1dc649336,,2021-08-07T06:50:25.458+00:00,2021-08-07T06:51:14.916+00:00,2021-08-07T06:51:14.933+00:00,,,,swiffer,156402,,,0
+1,114994501,18,12345678,29298577,12345678,opened,Add support for Snowpipe
usage
monitoring,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/18,0,0,0,master,master,,,8a8587ff3685544e4c1e9f96f9092f026ddefb01,,2021-09-01T21:15:30.334+00:00,2022-06-30T21:41:49.705+00:00,,,,Add
models and docs for Snowflake pipes (Snowpipe) usage monitoring based on the
views in Snowflake Usage schema,gary-beautypie,9635687,,,0
+1,135775405,19,12345678,32935405,12345678,opened,Updates for dbt
1.0,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/19,1,0,0,updates_for_dbt_1.0,master,,,88cf634905f23a1142b45f433989cbc0610465dd,,2022-01-18T19:59:30.723+00:00,2022-02-10T14:13:47.663+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
-1,145012495,20,12345678,34491818,12345678,closed,Draft: Update
dbt_project.yml,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/20,0,1,0,PedramNavid-master-patch-20645,master,,,2022-03-15T03:07:06.077+00:00,2022-03-15T03:07:22.642+00:00,2022-03-15T03:07:22.665+00:00,,,,PedramNavid,9722492,,,0
-1,158698019,21,12345678,12345678,12345678,opened,Draft: Corrections for dbt
1,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/21,0,1,0,updates_for_dbt_1_1,master,,,2022-06-03T09:24:53.707+00:00,2022-06-03T18:06:46.331+00:00,,,,Closes
https://gitlab.com/gitlab-data/analytics/-/issues/12941,paul_armstrong,5618371,,,0
+1,145012495,20,12345678,34491818,12345678,closed,Draft: Update
dbt_project.yml,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/20,0,1,0,PedramNavid-master-patch-20645,master,,,e8730e17bb809c3dd0fa8ceeb83c12798477bf94,,2022-03-15T03:07:06.077+00:00,2022-03-15T03:07:22.642+00:00,2022-03-15T03:07:22.665+00:00,,,,PedramNavid,9722492,,,0
+1,158698019,21,12345678,12345678,12345678,opened,Draft: Corrections for dbt
1,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/21,0,1,0,updates_for_dbt_1_1,master,,,f1d0704d7c6a022d4cdd1cc6d519b69740f7e5b4,,2022-06-03T09:24:53.707+00:00,2022-06-03T18:06:46.331+00:00,,,,Closes
https://gitlab.com/gitlab-data/analytics/-/issues/12941,paul_armstrong,5618371,,,0
diff --git a/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
b/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
index 915f6df2e..d9f51adc0 100644
--- a/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
+++ b/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
@@ -1,25 +1,25 @@
id,base_repo_id,head_repo_id,status,original_status,title,description,url,author_name,author_id,parent_pr_id,pull_request_key,created_date,merged_date,closed_date,type,component,merge_commit_sha,head_ref,base_ref,base_commit_sha,head_commit_sha
gitlab:GitlabMergeRequest:1:110817220,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:28584714,MERGED,merged,Update
packages.yml to point to dbt-labs instead of fishtown,With the company name
change the old repo is
deprecated.,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/16,GJMcClintock,gitlab:GitlabAccount:1:9439881,,16,2021-08-03T15:02:54.955+00:00,2021-08-12T06:12:54.329+00:00,,,,6f45b467c478df1c67d19cf6d4cbb8e05a710662,GJMcClintock-master-patch-24867,master,,
-gitlab:GitlabMergeRequest:1:111383524,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:0,CLOSED,closed,The
package name changed ->
https://hub.getdbt.com/dbt-labs/dbt_utils/latest/,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/17,swiffer,gitlab:GitlabAccount:1:156402,,17,2021-08-07T06:50:25.458+00:00,,2021-08-07T06:51:14.933+00:00,,,,swiffer-master-patch-77533,master,,
-gitlab:GitlabMergeRequest:1:114994501,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:29298577,OPEN,opened,Add
support for Snowpipe usage monitoring,Add models and docs for Snowflake pipes
(Snowpipe) usage monitoring based on the views in Snowflake Usage
schema,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/18,gary-beautypie,gitlab:GitlabAccount:1:9635687,,18,2021-09-01T21:15:30.334+00:00,,,,,,master,master,,
+gitlab:GitlabMergeRequest:1:111383524,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:0,CLOSED,closed,The
package name changed ->
https://hub.getdbt.com/dbt-labs/dbt_utils/latest/,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/17,swiffer,gitlab:GitlabAccount:1:156402,,17,2021-08-07T06:50:25.458+00:00,,2021-08-07T06:51:14.933+00:00,,,598ce24f1174d80556dd4432bfdcdce1dc649336,swiffer-master-patch-77533,master,,
+gitlab:GitlabMergeRequest:1:114994501,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:29298577,OPEN,opened,Add
support for Snowpipe usage monitoring,Add models and docs for Snowflake pipes
(Snowpipe) usage monitoring based on the views in Snowflake Usage
schema,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/18,gary-beautypie,gitlab:GitlabAccount:1:9635687,,18,2021-09-01T21:15:30.334+00:00,,,,,8a8587ff3685544e4c1e9f96f9092f026ddefb01,master,master,,
gitlab:GitlabMergeRequest:1:135775405,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:32935405,OPEN,opened,Updates
for dbt 1.0,"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?",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/19,johnj4,gitlab:GitlabAccount:1:10663622,,19,2022-01-18T19:59:30.723+00:00,,,,,,updates_for_dbt_1.0,master,,
-gitlab:GitlabMergeRequest:1:145012495,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:34491818,CLOSED,closed,Draft:
Update
dbt_project.yml,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/20,PedramNavid,gitlab:GitlabAccount:1:9722492,,20,2022-03-15T03:07:06.077+00:00,,2022-03-15T03:07:22.665+00:00,,,,PedramNavid-master-patch-20645,master,,
-gitlab:GitlabMergeRequest:1:158698019,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:12345678,OPEN,opened,Draft:
Corrections for dbt 1,Closes
https://gitlab.com/gitlab-data/analytics/-/issues/12941,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/21,paul_armstrong,gitlab:GitlabAccount:1:5618371,,21,2022-06-03T09:24:53.707+00:00,,,,,,updates_for_dbt_1_1,master,,
+Could a new release be made for dbt
1.0?",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/19,johnj4,gitlab:GitlabAccount:1:10663622,,19,2022-01-18T19:59:30.723+00:00,,,,,88cf634905f23a1142b45f433989cbc0610465dd,updates_for_dbt_1.0,master,,
+gitlab:GitlabMergeRequest:1:145012495,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:34491818,CLOSED,closed,Draft:
Update
dbt_project.yml,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/20,PedramNavid,gitlab:GitlabAccount:1:9722492,,20,2022-03-15T03:07:06.077+00:00,,2022-03-15T03:07:22.665+00:00,,,e8730e17bb809c3dd0fa8ceeb83c12798477bf94,PedramNavid-master-patch-20645,master,,
+gitlab:GitlabMergeRequest:1:158698019,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:12345678,OPEN,opened,Draft:
Corrections for dbt 1,Closes
https://gitlab.com/gitlab-data/analytics/-/issues/12941,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/21,paul_armstrong,gitlab:GitlabAccount:1:5618371,,21,2022-06-03T09:24:53.707+00:00,,,,,f1d0704d7c6a022d4cdd1cc6d519b69740f7e5b4,updates_for_dbt_1_1,master,,
gitlab:GitlabMergeRequest:1:32348491,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:12345678,MERGED,merged,"Resolve
""Add documentation to snowflake spend package""",Closes
#1,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/1,emilie,gitlab:GitlabAccount:1:2295562,,1,2019-06-28T05:21:43.743+00:00,2019-06-28T14:32:06.192+00:00,,,,da1d6dea48f5972ffc683da6cff30934e7d6c52c,1-add-documentation-to-snowflake-spend-package,master,,
gitlab:GitlabMergeRequest:1:35064956,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:13835497,MERGED,merged,Update
README to include steps to resolve a potential dbt-utils conflict,Closes
#5,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/3,martinguindon,gitlab:GitlabAccount:1:3871284,,3,2019-08-15T19:34:32.706+00:00,2019-08-26T14:15:27.922+00:00,,,,d678bea9d47b42eb13512d1c9d6a592d80b432d4,5-update-readme-to-include-steps-to-resolve-a-potential-dbt-utils-conflict,master,,
gitlab:GitlabMergeRequest:1:35841926,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:12345678,MERGED,merged,"Resolve
""Config is not generic enough""",Closes
#4,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/4,emilie,gitlab:GitlabAccount:1:2295562,,4,2019-08-26T15:32:49.557+00:00,2019-08-26T15:37:50.105+00:00,,,,e95b5db25e15a38e21d11cb45cc21bf17d5c407c,4-config-is-not-generic-enough,master,,
gitlab:GitlabMergeRequest:1:53445063,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:15706315,MERGED,merged,Issue
3 Base
model,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/5,nehiljain,gitlab:GitlabAccount:1:783199,,5,2020-03-24T12:46:15.891+00:00,2020-03-25T18:36:45.801+00:00,,,,f2ee4cf121a328ce39723506dc18e4661941971a,issue_3,master,,
gitlab:GitlabMergeRequest:1:53627854,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:15706063,MERGED,merged,Update
schema.yml typo in
docs,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/6,nehiljain,gitlab:GitlabAccount:1:783199,,6,2020-03-25T19:02:16.747+00:00,2020-03-25T19:04:19.844+00:00,,,,12dcc23a45adce0b12f8687438ec3a28274c7c30,patch-1,master,,
gitlab:GitlabMergeRequest:1:55146687,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:12345678,MERGED,merged,"Resolve
""Document release process""",Closes
#6,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/8,m_walker,gitlab:GitlabAccount:1:5212782,,8,2020-04-08T20:07:10.223+00:00,2020-04-08T20:52:11.150+00:00,,,,7c8245a3a5eda7f502737940aaf7944d99c58f2e,6-document-release-process,master,,
-gitlab:GitlabMergeRequest:1:55146787,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:15706315,OPEN,opened,Issue
3: Transformed model for query
performance,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/9,nehiljain,gitlab:GitlabAccount:1:783199,,9,2020-04-08T20:09:08.130+00:00,,,,,,issue_3,master,,
+gitlab:GitlabMergeRequest:1:55146787,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:15706315,OPEN,opened,Issue
3: Transformed model for query
performance,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/9,nehiljain,gitlab:GitlabAccount:1:783199,,9,2020-04-08T20:09:08.130+00:00,,,,,8fc1f7e0d4c08b76764ff87d6d40fc0c3b37d6b4,issue_3,master,,
gitlab:GitlabMergeRequest:1:58311001,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:12345678,MERGED,merged,Update
version in
readme,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/10,emilie,gitlab:GitlabAccount:1:2295562,,10,2020-05-11T17:09:12.265+00:00,2020-05-11T17:09:20.603+00:00,,,,66c0f1de49a0c876b8f93e8e0dce3327e766f59d,emilie-master-patch-23079,master,,
-gitlab:GitlabMergeRequest:1:62519057,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:19569570,OPEN,opened,Clustering
metering
models,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/11,jainnehil,gitlab:GitlabAccount:1:842680,,11,2020-06-24T12:34:04.792+00:00,,,,,,clustering-metering,master,,
+gitlab:GitlabMergeRequest:1:62519057,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:19569570,OPEN,opened,Clustering
metering
models,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/11,jainnehil,gitlab:GitlabAccount:1:842680,,11,2020-06-24T12:34:04.792+00:00,,,,,8d7c748e10e8d35c3d0157c8fdd5b1b73e52132b,clustering-metering,master,,
gitlab:GitlabMergeRequest:1:65505080,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:12345678,MERGED,merged,"Resolve
""Upgrade package for dbt 0.17""","Closes #11
* Upgrades to 0.17.0 format
* Formatting changes to be in line with GitLab SQL Style
Guide",https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/12,tayloramurphy,gitlab:GitlabAccount:1:1942272,,12,2020-07-24T17:47:08.238+00:00,2020-07-24T21:13:35.321+00:00,,,,9bfc136eb90802c2ce59956c34dde01bb3de0d50,11-upgrade-package-for-dbt-0-17,master,,
-gitlab:GitlabMergeRequest:1:68978485,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:15706315,CLOSED,closed,Include
more snowflake qrt
columns,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/13,aianus,gitlab:GitlabAccount:1:2478227,,13,2020-08-27T20:17:01.825+00:00,,2020-08-27T20:20:08.150+00:00,,,,include_more_snowflake_qrt_columns,master,,
+gitlab:GitlabMergeRequest:1:68978485,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:15706315,CLOSED,closed,Include
more snowflake qrt
columns,,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/13,aianus,gitlab:GitlabAccount:1:2478227,,13,2020-08-27T20:17:01.825+00:00,,2020-08-27T20:20:08.150+00:00,,,1cfe7c21c8726d8fda037d7ad26a16faacfe65b4,include_more_snowflake_qrt_columns,master,,
gitlab:GitlabMergeRequest:1:89243644,gitlab:GitlabProject:1:12345678,gitlab:GitlabProject:1:24539973,MERGED,merged,Update
README.md to use the newest version as an example,Update README.md to use the
newest version as an example. The old version doesn't work with the current
version of
dbt,https://gitlab.com/gitlab-data/snowflake_spend/-/merge_requests/14,ThomasLaPiana,gitlab:GitlabAccount:1:2061802,,14,2021-02-19T20:12:14.302+00:00,2021-02-19T20:13:05.969+00:00,,,,21840a7eadb58babe8aeae
[...]
diff --git a/backend/plugins/gitlab/models/migrationscripts/register.go
b/backend/plugins/gitlab/models/migrationscripts/20230625_add_mr_commitsha.go
similarity index 50%
copy from backend/plugins/gitlab/models/migrationscripts/register.go
copy to
backend/plugins/gitlab/models/migrationscripts/20230625_add_mr_commitsha.go
index 2ef9c9ede..8fd9dd69e 100644
--- a/backend/plugins/gitlab/models/migrationscripts/register.go
+++
b/backend/plugins/gitlab/models/migrationscripts/20230625_add_mr_commitsha.go
@@ -18,24 +18,38 @@ limitations under the License.
package migrationscripts
import (
- "github.com/apache/incubator-devlake/core/plugin"
+ "github.com/apache/incubator-devlake/core/context"
+ "github.com/apache/incubator-devlake/core/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
)
-// All return all the migration scripts
-func All() []plugin.MigrationScript {
- return []plugin.MigrationScript{
- new(addInitTables),
- new(addGitlabCI),
- new(addPipelineID),
- new(addPipelineProjects),
- new(fixDurationToFloat8),
- new(addTransformationRule20221125),
- new(addStdTypeToIssue221230),
- new(addIsDetailRequired20230210),
- new(addConnectionIdToTransformationRule),
- new(addGitlabCommitAuthorInfo),
- new(addTypeEnvToPipeline),
- new(renameTr2ScopeConfig),
- new(addGitlabIssueAssignee),
+type addMrCommitSha struct{}
+
+type GitlabMergeRequest20230625 struct {
+ MergeCommitSha string `gorm:"type:varchar(255)"`
+ SquashCommitSha string `gorm:"type:varchar(255)"`
+}
+
+func (GitlabMergeRequest20230625) TableName() string {
+ return "_tool_gitlab_merge_requests"
+}
+
+func (*addMrCommitSha) Up(baseRes context.BasicRes) errors.Error {
+ err := migrationhelper.AutoMigrateTables(
+ baseRes,
+ &GitlabMergeRequest20230625{},
+ )
+ if err != nil {
+ return err
}
+
+ return nil
+}
+
+func (*addMrCommitSha) Version() uint64 {
+ return 20230625110339
+}
+
+func (*addMrCommitSha) Name() string {
+ return "add _tool_gitlab_issue_assignees table"
}
diff --git a/backend/plugins/gitlab/models/migrationscripts/register.go
b/backend/plugins/gitlab/models/migrationscripts/register.go
index 2ef9c9ede..eba26b3ac 100644
--- a/backend/plugins/gitlab/models/migrationscripts/register.go
+++ b/backend/plugins/gitlab/models/migrationscripts/register.go
@@ -37,5 +37,6 @@ func All() []plugin.MigrationScript {
new(addTypeEnvToPipeline),
new(renameTr2ScopeConfig),
new(addGitlabIssueAssignee),
+ new(addMrCommitSha),
}
}