Add support for GitLab Draft/WIP MRs
Created by: eseliger
This contains the GitLab part of https://github.com/sourcegraph/sourcegraph/issues/7998.
- In the first commit, I implemented the events and state/history logic required to work for GitLab.
- In the second commit, I implemented the DraftChangesetSource on the GitLab client.
- In the third commit, some cleanup and fixes.
Tradeoff: There is no way to tell Update
events apart, marking as WIP and unmarking do only trigger update events in the webhooks (which is fine I think).
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #15004 into main will increase coverage by
0.00%
. The diff coverage is59.34%
.@@ Coverage Diff @@ ## main #15004 +/- ## ======================================= Coverage 52.36% 52.36% ======================================= Files 1556 1556 Lines 79548 79607 +59 Branches 7146 7146 ======================================= + Hits 41654 41685 +31 - Misses 34149 34177 +28 Partials 3745 3745
Flag Coverage Δ *Carryforward flag #go 52.33% <59.34%> (+<0.01%)
#integration 30.41% <ø> (ø)
Carriedforward from 0fcea04 #storybook 25.82% <ø> (ø)
Carriedforward from 0fcea04 #typescript 52.44% <ø> (ø)
Carriedforward from 0fcea04 #unit 34.11% <ø> (ø)
Carriedforward from 0fcea04 *This pull request uses carry forward flags. Click here to find out more.
Impacted Files Coverage Δ internal/campaigns/changeset_event.go 0.00% <0.00%> (ø)
internal/campaigns/util.go 11.11% <ø> (ø)
cmd/repo-updater/repos/gitlab.go 77.12% <7.14%> (-3.96%)
internal/campaigns/changeset.go 49.86% <62.50%> (+<0.01%)
enterprise/internal/campaigns/changeset_history.go 84.49% <100.00%> (+1.44%)
enterprise/internal/campaigns/reconciler.go 61.44% <100.00%> (+0.47%)
enterprise/internal/campaigns/state.go 78.39% <100.00%> (+0.20%)
internal/extsvc/gitlab/merge_requests.go 70.00% <100.00%> (+3.33%)
internal/extsvc/gitlab/notes.go 85.18% <100.00%> (+2.57%)
internal/db/helpers.go 100.00% <0.00%> (ø)
... and 765 more Created by: sourcegraph-bot
Notifying subscribers in CODENOTIFY files for diff 44004287a82809935a72a9ce76d2156900db4f11...a273a6b0f7a22e95e46b9a2309bc13eefb338c82.
Notify File(s) @LawnGnome enterprise/internal/campaigns/changeset_history.go
enterprise/internal/campaigns/counts_test.go
enterprise/internal/campaigns/reconciler.go
enterprise/internal/campaigns/state.go
enterprise/internal/campaigns/state_test.go
internal/campaigns/changeset.go
internal/campaigns/changeset_event.go
internal/campaigns/changeset_event_test.go
internal/campaigns/util.goCreated by: sonarcloud[bot]
SonarCloud Quality Gate failed.
0 Bugs
0 Vulnerabilities (and
0 Security Hotspots to review)
6 Code Smells
No Coverage information
3.9% Duplication