Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion addon_imps/storage/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ async def list_root_items(self, page_cursor: str = "") -> storage.ItemSampleResu
{
"membership": "true",
"simple": "true",
"pagination": "true",
"pagination": "keyset",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the following response from GitLab when I try to connect account:
{'error': 'Keyset pagination is not yet available for this type of request'}
I'm using the following url: https://gitlab.com/api/v4/

"order_by": "name",
"sort": "asc",
"per_page": "30",
},
)
async with self.network.GET(
Expand Down Expand Up @@ -185,6 +187,7 @@ async def list_child_items(
"path": parsed_id.file_path,
"sort": "asc",
"order_by": "name",
"per_page": "30",
},
)
async with self.network.GET(
Expand Down
12 changes: 10 additions & 2 deletions addon_imps/tests/storage/test_gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ async def test_list_root_items(self):
{
"membership": "true",
"simple": "true",
"pagination": "true",
"pagination": "keyset",
"order_by": "name",
"sort": "asc",
"per_page": "30",
},
)

Expand Down Expand Up @@ -132,7 +134,13 @@ async def test_list_child_items_folder(self):
self.assertEqual(result.items, expected_result.items)
self._assert_get(
"projects/1/repository/tree",
{"pagination": "keyset", "path": "", "sort": "asc", "order_by": "name"},
{
"pagination": "keyset",
"path": "",
"sort": "asc",
"order_by": "name",
"per_page": "30",
},
)

async def test_get_item_info_file_not_found(self):
Expand Down