Commit Graph

12 Commits

Author SHA1 Message Date
Chris Lemaire
af749eb68a [gitlab] Replace MR list loading with a ListLoader
Subsequently, this changes the way the list model is updated from an event-based approach to a complete replacement of the list model.
If this causes UI problems, we can always put in a smarter calculation of list differences before updating the list model.

GitOrigin-RevId: 9ccd0aa817925abfa7e6b87f5e2981bfd8971c2f
2024-04-29 11:54:05 +00:00
Chris Lemaire
807ded8014 [collab] Add an abstraction for loading and keeping data from API up-to-date
Reason for the abstraction is to standardize reloading and refreshing.
This should make it significantly easier to add refreshing/reloading lists of data.

`GitLabETagUpdatableListLoader` is replaced by
`startGitLabRestETagListLoaderIn` which creates a new ListLoader and starts it.

As a proof of concept, the list loaders for timeline events are replaced.

GitOrigin-RevId: df8f89a9a8b1ee948f21686d2fc9f7b528f73cd1
2024-04-29 11:54:05 +00:00
Ivan Semenov
f662990cc2 [gitlab] do not look up closed MRs for current branch
#IDEA-337071 Fixed

GitOrigin-RevId: b35f4dd38d626b3f9531cffb4ae8694916983058
2024-01-09 19:36:47 +00:00
Pavel Gromov
152dd7a5c1 [gitlab] Load commits for merge request in a separate request
GitOrigin-RevId: dbf00d2c71fa2077b572c19e7866017af3557f15
2023-12-12 16:30:09 +00:00
Pavel Gromov
d8275d1a1c [gitlab] Calculate the approved status based on user reviews
* #IDEA-325641 Fixed

GitOrigin-RevId: aac50c9a20f085bf9cdece47d703ded41d075ecf
2023-11-10 16:14:07 +00:00
Chris Lemaire
f363415d49 [gitlab] Ensure reloads cause new timeline items to show (IDEA-326997)
This makes sure that all flows of items that will need to be reloaded after an error
are actually reloadable (`GitLabETagUpdatableListLoader`).
It adds a `reload` action for timeline VMs so that the merge request data
can be re-fetched from the start.

GitOrigin-RevId: 895a009968683d7850b83666e17cb9fcb2fc623c
2023-11-08 21:29:45 +00:00
Chris Lemaire
b217db9d30 [collab/gitlab] Replace .asResultFlow/.throwFailure combos
These combinations caused exceptions to be re-thrown mid-flow
and are misleading. Because of the re-throwing, these flows would
be completely canceled, making it very difficult in the current code
to restart them.

GitOrigin-RevId: c0a58dabf9ea32e21f75160076b54303322aa4c0
2023-11-08 21:29:45 +00:00
Chris Lemaire
6b04339c37 [gitlab] Show 'invalid token' message when user revoked token (IDEA-332704)
This commit channels most of the functions that use `getCurrentUser` as
a check of logged in-ness through a new `getCurrentUserAsResult` function,
which already converts failures into appropriate errors.

GitOrigin-RevId: 4b74e0b46222dc965f45c353d4bcfb140699e48f
2023-11-03 12:17:03 +00:00
Chris Lemaire
e0fc320659 [gitlab] Add ID-representation classes to track guessing
These ID implementations are introduced in the relevant DTOs and model
classes for adding draft notes, but should be introduced throughout the
code-base to mark IDs we get back from GitLab unambiguously and to keep
track of the times we 'guess' a REST ID from a GID and vice versa.

GitOrigin-RevId: bd21902a15412dad33955e911989c3038383bed5
2023-10-19 13:52:24 +00:00
Chris Lemaire
61875836f7 [gitlab] Rename checks to '*Predicate'
GitOrigin-RevId: e0fa68dff2c8a6f97ad0cd0de1bf8db2351c1dea
2023-10-17 12:31:51 +00:00
Chris Lemaire
89fd23fde8 [gitlab] Run API tests on JUnit 5 without application
This requires a small refactoring to make sure no services
are required during creation of GitLabApi instances.

GitOrigin-RevId: e199e45f095c6900e3cffe39654991b1c5f18eaa
2023-10-17 12:31:51 +00:00
Chris Lemaire
677f9fca43 [gitlab] Add tests checking Project API with test data
Adds the generic test case class and implementations of
various API calls.

Also adds a configuration to run those tests.

GitOrigin-RevId: 58412ad1c9a33671aa35a78fd43168aaf6e3b85f
2023-10-17 12:31:51 +00:00