janet-cli 0.2.5__py3-none-any.whl → 0.2.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- janet/__init__.py +1 -1
- janet/api/tickets.py +10 -4
- janet/sync/sync_engine.py +18 -4
- {janet_cli-0.2.5.dist-info → janet_cli-0.2.6.dist-info}/METADATA +1 -1
- {janet_cli-0.2.5.dist-info → janet_cli-0.2.6.dist-info}/RECORD +9 -9
- {janet_cli-0.2.5.dist-info → janet_cli-0.2.6.dist-info}/WHEEL +0 -0
- {janet_cli-0.2.5.dist-info → janet_cli-0.2.6.dist-info}/entry_points.txt +0 -0
- {janet_cli-0.2.5.dist-info → janet_cli-0.2.6.dist-info}/licenses/LICENSE +0 -0
- {janet_cli-0.2.5.dist-info → janet_cli-0.2.6.dist-info}/top_level.txt +0 -0
janet/__init__.py
CHANGED
janet/api/tickets.py
CHANGED
|
@@ -99,16 +99,20 @@ class TicketAPI(APIClient):
|
|
|
99
99
|
|
|
100
100
|
return response.get("tickets", [])
|
|
101
101
|
|
|
102
|
-
def
|
|
102
|
+
def sync_tickets_paginated(
|
|
103
|
+
self, project_id: str, limit: int = 500, offset: int = 0
|
|
104
|
+
) -> Dict:
|
|
103
105
|
"""
|
|
104
|
-
Get
|
|
105
|
-
|
|
106
|
+
Get tickets for a project using the CLI sync endpoint with pagination.
|
|
107
|
+
Supports up to 500 tickets per page.
|
|
106
108
|
|
|
107
109
|
Args:
|
|
108
110
|
project_id: Project ID
|
|
111
|
+
limit: Tickets per page (max 500)
|
|
112
|
+
offset: Pagination offset
|
|
109
113
|
|
|
110
114
|
Returns:
|
|
111
|
-
Dictionary with
|
|
115
|
+
Dictionary with tickets and pagination info
|
|
112
116
|
|
|
113
117
|
Raises:
|
|
114
118
|
NetworkError: If API request fails
|
|
@@ -117,6 +121,8 @@ class TicketAPI(APIClient):
|
|
|
117
121
|
|
|
118
122
|
data = {
|
|
119
123
|
"show_resolved_over_7_days": True,
|
|
124
|
+
"limit": limit,
|
|
125
|
+
"offset": offset,
|
|
120
126
|
}
|
|
121
127
|
|
|
122
128
|
response = self.post(endpoint, data=data, include_org=True)
|
janet/sync/sync_engine.py
CHANGED
|
@@ -114,11 +114,25 @@ class SyncEngine:
|
|
|
114
114
|
"""
|
|
115
115
|
org_name = self.config.selected_organization.name
|
|
116
116
|
|
|
117
|
-
# Fetch all tickets using CLI sync endpoint
|
|
118
|
-
|
|
117
|
+
# Fetch all tickets using CLI sync endpoint with pagination (500 per page)
|
|
118
|
+
tickets = []
|
|
119
|
+
offset = 0
|
|
120
|
+
limit = 500 # CLI endpoint allows 500 per page
|
|
119
121
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
while True:
|
|
123
|
+
response = self.ticket_api.sync_tickets_paginated(project_id, limit=limit, offset=offset)
|
|
124
|
+
|
|
125
|
+
page_tickets = response.get("tickets", [])
|
|
126
|
+
if not page_tickets:
|
|
127
|
+
break
|
|
128
|
+
|
|
129
|
+
tickets.extend(page_tickets)
|
|
130
|
+
|
|
131
|
+
# Check if there are more
|
|
132
|
+
if response.get("has_more"):
|
|
133
|
+
offset = response.get("next_offset", offset + limit)
|
|
134
|
+
else:
|
|
135
|
+
break
|
|
122
136
|
|
|
123
137
|
if not tickets:
|
|
124
138
|
console.print(f" [dim]↳ {project_key} - No tickets found[/dim]")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
janet/__init__.py,sha256=
|
|
1
|
+
janet/__init__.py,sha256=gjU3zE-WTe-MGof0JKmiwUEHDAijGfenaxKMB-067B4,82
|
|
2
2
|
janet/__main__.py,sha256=nxsNRykF1aXRRSYNcMvohre4QDfpUzyr5JMyHRHWrwI,130
|
|
3
3
|
janet/cli.py,sha256=AxjY76l5d7NnsaYEEvUP4dJ1LxXsY1Ya-uNaTGSfXd8,20391
|
|
4
4
|
janet/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -6,7 +6,7 @@ janet/api/client.py,sha256=fiIpCaQlvXBn_T2VGf0sT9jyQE83Xx7o_WJkCDnwykY,4399
|
|
|
6
6
|
janet/api/models.py,sha256=41or0kCcEJ3KJ2QCdV1xbrAoAcma_DteqqVlO0Ng18g,2002
|
|
7
7
|
janet/api/organizations.py,sha256=abaita6e2drm6RikTOfU-E1ohPeRPhiTYmWRFG0kqaQ,1539
|
|
8
8
|
janet/api/projects.py,sha256=Oxao4vvXMuXWMfUwZUuBrhkSUtC8t57FNc2d6Qzd5ms,1488
|
|
9
|
-
janet/api/tickets.py,sha256=
|
|
9
|
+
janet/api/tickets.py,sha256=wMWqjHXj0UIEViFCCq7r1rTlIRbb0QrU5rgjJW7ioTk,4293
|
|
10
10
|
janet/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
janet/auth/callback_server.py,sha256=mLkkQMMN6PnNUFf4mlQyY3eKOgK1W6_9O9u90xsLMhY,12499
|
|
12
12
|
janet/auth/oauth_flow.py,sha256=YaLQVRXyhAvZ3IWkd3AvjQlCkQgRRjhPEU9fXfZBgko,9133
|
|
@@ -20,14 +20,14 @@ janet/markdown/yjs_converter.py,sha256=omoT6dZ0K3UIoSun2fczTw56vbTrHomz64no3U0YU
|
|
|
20
20
|
janet/sync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
janet/sync/file_manager.py,sha256=fwV0VYP-0ZpwTAyDVqlVUPn3MB2wK6TvFQq450Lhr0I,5839
|
|
22
22
|
janet/sync/readme_generator.py,sha256=RHfqlr-3oyGIy5zRbMcloAo1rrwy5aSqAvleC49QZME,6847
|
|
23
|
-
janet/sync/sync_engine.py,sha256=
|
|
23
|
+
janet/sync/sync_engine.py,sha256=YwkMvVhHe-QfNl4IR1DxQe_OxNBZLvv9T4Emlvmm9JI,9316
|
|
24
24
|
janet/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
janet/utils/console.py,sha256=zMhX4HUXSco-or9KpqBJmYCzmfH_GWtvq-n2Sy6Dfgc,927
|
|
26
26
|
janet/utils/errors.py,sha256=yxoVDF7ovMT7ooJA-8cvxJK8_3nWumGv7s1n8povi-4,783
|
|
27
27
|
janet/utils/paths.py,sha256=JYp5gcSEjIbYNJaUcAwdpz6rmta9m0JzoBARC6_AWmM,1706
|
|
28
|
-
janet_cli-0.2.
|
|
29
|
-
janet_cli-0.2.
|
|
30
|
-
janet_cli-0.2.
|
|
31
|
-
janet_cli-0.2.
|
|
32
|
-
janet_cli-0.2.
|
|
33
|
-
janet_cli-0.2.
|
|
28
|
+
janet_cli-0.2.6.dist-info/licenses/LICENSE,sha256=wNChlibp2El7r-zfLH8QhOg2oLPAvGwP7ETnVWyNRio,1065
|
|
29
|
+
janet_cli-0.2.6.dist-info/METADATA,sha256=Loz7MuAGTOiY6A-5SPbfrD1fTByEPiJbn7aHr7eg6U4,5875
|
|
30
|
+
janet_cli-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
janet_cli-0.2.6.dist-info/entry_points.txt,sha256=MeYUkStK_xcqW3AylPNpQh_H5zmfojB1-d8WMhifkvw,40
|
|
32
|
+
janet_cli-0.2.6.dist-info/top_level.txt,sha256=Ux5zWeRoPO3Tu87toTRoiwMkIQNQylV9aRO2g7KqNW4,6
|
|
33
|
+
janet_cli-0.2.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|