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/devlake.git
The following commit(s) were added to refs/heads/main by this push:
new ea8c25c6c fix(gitlab): map WorkInProgress to IsDraft in MR converter
(#8982)
ea8c25c6c is described below
commit ea8c25c6c2b8ffb2361e19d17d849ba306a1029f
Author: Francisc Munteanu <[email protected]>
AuthorDate: Wed Aug 12 10:20:14 2026 +0200
fix(gitlab): map WorkInProgress to IsDraft in MR converter (#8982)
WorkInProgress was extracted from the GitLab API and stored in
_tool_gitlab_merge_requests but never forwarded to code.PullRequest.IsDraft
during conversion. Draft/WIP MRs were indistinguishable from non-draft MRs
at the domain layer.
- Add IsDraft: gitlabMr.WorkInProgress to the converter struct
- Update e2e snapshot: MRs 145012495 and 158698019 now have is_draft=1
---
backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv | 4 ++--
backend/plugins/gitlab/tasks/mr_convertor.go | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
b/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
index fa42cbc4b..e8f303130 100644
--- a/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
+++ b/backend/plugins/gitlab/e2e/snapshot_tables/pull_requests.csv
@@ -6,8 +6,8 @@
gitlab:GitlabMergeRequest:1:135775405,gitlab:GitlabProject:1:12345678,gitlab:Git
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,,,,,88cf634905f23a1142b45f433989cbc0610465dd,updates_for_dbt_1.0,master,,,0,0,0
-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,,,0,0,0
-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,,,0,0,0
+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,,,0,0,1
+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,,,0,0,1
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,,,0,0,0
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
[...]
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,,,0,0,0
diff --git a/backend/plugins/gitlab/tasks/mr_convertor.go
b/backend/plugins/gitlab/tasks/mr_convertor.go
index f2dd24d74..369a5b516 100644
--- a/backend/plugins/gitlab/tasks/mr_convertor.go
+++ b/backend/plugins/gitlab/tasks/mr_convertor.go
@@ -99,6 +99,7 @@ func ConvertApiMergeRequests(subtaskCtx
plugin.SubTaskContext) errors.Error {
HeadRef: gitlabMr.SourceBranch,
BaseRef: gitlabMr.TargetBranch,
Component: gitlabMr.Component,
+ IsDraft: gitlabMr.WorkInProgress,
}
switch gitlabMr.State {
case "opened":