fluidattacks_gitlab_sdk 1.0.0__tar.gz
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.
- fluidattacks_gitlab_sdk-1.0.0/.envrc +2 -0
- fluidattacks_gitlab_sdk-1.0.0/PKG-INFO +13 -0
- fluidattacks_gitlab_sdk-1.0.0/build/default.nix +7 -0
- fluidattacks_gitlab_sdk-1.0.0/build/filter.nix +12 -0
- fluidattacks_gitlab_sdk-1.0.0/flake.lock +351 -0
- fluidattacks_gitlab_sdk-1.0.0/flake.nix +19 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/__init__.py +22 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_decoders.py +170 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_gql_client/__init__.py +8 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_gql_client/_client.py +101 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_gql_client/_error.py +24 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_gql_client/_handlers.py +87 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_handlers.py +40 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_http_client/__init__.py +28 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_http_client/_client_1.py +206 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_http_client/_core.py +152 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/_logger.py +36 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/ids.py +135 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/issues/__init__.py +7 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/issues/_client/__init__.py +28 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/issues/_client/_decode.py +165 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/issues/_client/_get_issue.py +79 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/issues/_client/_most_recent.py +119 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/issues/_client/_updated_by.py +157 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/issues/core.py +99 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/members/__init__.py +25 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/members/_client.py +49 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/members/_decode.py +40 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/members/core.py +23 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/merge_requests/__init__.py +9 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/merge_requests/_client.py +265 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/merge_requests/_decode.py +234 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/merge_requests/core.py +137 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/milestones/__init__.py +4 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/milestones/_client.py +147 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/milestones/_decode.py +78 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/milestones/core.py +40 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/mr_approvals/__init__.py +4 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/mr_approvals/_client.py +69 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/mr_approvals/_decode.py +30 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/mr_approvals/core.py +25 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/py.typed +0 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/users/__init__.py +5 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/users/core.py +26 -0
- fluidattacks_gitlab_sdk-1.0.0/fluidattacks_gitlab_sdk/users/decode.py +25 -0
- fluidattacks_gitlab_sdk-1.0.0/mypy.ini +30 -0
- fluidattacks_gitlab_sdk-1.0.0/pyproject.toml +35 -0
- fluidattacks_gitlab_sdk-1.0.0/ruff.toml +37 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/arch/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/arch/arch.py +86 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/arch/test_arch.py +43 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/issues/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/issues/data.json +126 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/issues/test_decode.py +105 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/members/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/members/data.json +74 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/members/test_decode_members.py +46 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/merge_request/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/merge_request/data.json +112 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/merge_request/data_mr_updates.json +226 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/merge_request/test_decode.py +245 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/mr_approvals/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/mr_approvals/data.json +62 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/mr_approvals/decoder_test.py +63 -0
- fluidattacks_gitlab_sdk-1.0.0/tests/py.typed +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/_utils.py +49 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/issues/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/issues/test_issue_client.py +77 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/members/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/members/test_client_members.py +61 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/milestones/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/milestones/client_test.py +48 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/mr_approvals/__init__.py +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/mr_approvals/client_test.py +33 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/py.typed +0 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/test_gql_client.py +32 -0
- fluidattacks_gitlab_sdk-1.0.0/tests_fx/test_mr.py +61 -0
- fluidattacks_gitlab_sdk-1.0.0/uv.lock +1286 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fluidattacks_gitlab_sdk
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: gitlab SDK
|
|
5
|
+
Author-email: Product Team <development@fluidattacks.com>
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Requires-Dist: gql >=3.5.0, <4.0.0
|
|
8
|
+
Requires-Dist: requests-toolbelt >=1.0.0, <2.0.0
|
|
9
|
+
Requires-Dist: fa-purity >=2.5.2, <3.0.0
|
|
10
|
+
Requires-Dist: pure-requests >=3.0.0, <4.0.0
|
|
11
|
+
Requires-Dist: python-dateutil >=2.8.0, <3.0.0
|
|
12
|
+
Requires-Dist: fluidattacks-etl-utils >=1.0.0, <2.0.0
|
|
13
|
+
Requires-Dist: fluidattacks-utils-logger >=1.0.0, <2.0.0
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nodes": {
|
|
3
|
+
"flake-parts": {
|
|
4
|
+
"inputs": {
|
|
5
|
+
"nixpkgs-lib": "nixpkgs-lib"
|
|
6
|
+
},
|
|
7
|
+
"locked": {
|
|
8
|
+
"lastModified": 1754487366,
|
|
9
|
+
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
|
10
|
+
"owner": "hercules-ci",
|
|
11
|
+
"repo": "flake-parts",
|
|
12
|
+
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
|
13
|
+
"type": "github"
|
|
14
|
+
},
|
|
15
|
+
"original": {
|
|
16
|
+
"owner": "hercules-ci",
|
|
17
|
+
"repo": "flake-parts",
|
|
18
|
+
"type": "github"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"nix_filter": {
|
|
22
|
+
"locked": {
|
|
23
|
+
"lastModified": 1731533336,
|
|
24
|
+
"narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
|
|
25
|
+
"owner": "numtide",
|
|
26
|
+
"repo": "nix-filter",
|
|
27
|
+
"rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
|
|
28
|
+
"type": "github"
|
|
29
|
+
},
|
|
30
|
+
"original": {
|
|
31
|
+
"owner": "numtide",
|
|
32
|
+
"repo": "nix-filter",
|
|
33
|
+
"type": "github"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"nix_filter_2": {
|
|
37
|
+
"locked": {
|
|
38
|
+
"lastModified": 1731533336,
|
|
39
|
+
"narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
|
|
40
|
+
"owner": "numtide",
|
|
41
|
+
"repo": "nix-filter",
|
|
42
|
+
"rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
|
|
43
|
+
"type": "github"
|
|
44
|
+
},
|
|
45
|
+
"original": {
|
|
46
|
+
"owner": "numtide",
|
|
47
|
+
"repo": "nix-filter",
|
|
48
|
+
"type": "github"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"nixpkgs": {
|
|
52
|
+
"locked": {
|
|
53
|
+
"lastModified": 1736441877,
|
|
54
|
+
"narHash": "sha256-m3+PhBFkDwqo9lBplG4AyMW8P4/KcioJRS1UG8N7okM=",
|
|
55
|
+
"owner": "nixos",
|
|
56
|
+
"repo": "nixpkgs",
|
|
57
|
+
"rev": "ce3899414dab3297cf025bfa356dc2da426feefd",
|
|
58
|
+
"type": "github"
|
|
59
|
+
},
|
|
60
|
+
"original": {
|
|
61
|
+
"owner": "nixos",
|
|
62
|
+
"repo": "nixpkgs",
|
|
63
|
+
"type": "github"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"nixpkgs-lib": {
|
|
67
|
+
"locked": {
|
|
68
|
+
"lastModified": 1753579242,
|
|
69
|
+
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
|
70
|
+
"owner": "nix-community",
|
|
71
|
+
"repo": "nixpkgs.lib",
|
|
72
|
+
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
|
73
|
+
"type": "github"
|
|
74
|
+
},
|
|
75
|
+
"original": {
|
|
76
|
+
"owner": "nix-community",
|
|
77
|
+
"repo": "nixpkgs.lib",
|
|
78
|
+
"type": "github"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"nixpkgs_2": {
|
|
82
|
+
"locked": {
|
|
83
|
+
"lastModified": 1758690382,
|
|
84
|
+
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
|
|
85
|
+
"owner": "nixos",
|
|
86
|
+
"repo": "nixpkgs",
|
|
87
|
+
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
|
|
88
|
+
"type": "github"
|
|
89
|
+
},
|
|
90
|
+
"original": {
|
|
91
|
+
"owner": "nixos",
|
|
92
|
+
"ref": "nixos-unstable",
|
|
93
|
+
"repo": "nixpkgs",
|
|
94
|
+
"type": "github"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"nixpkgs_3": {
|
|
98
|
+
"locked": {
|
|
99
|
+
"lastModified": 1758690382,
|
|
100
|
+
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
|
|
101
|
+
"owner": "nixos",
|
|
102
|
+
"repo": "nixpkgs",
|
|
103
|
+
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
|
|
104
|
+
"type": "github"
|
|
105
|
+
},
|
|
106
|
+
"original": {
|
|
107
|
+
"owner": "nixos",
|
|
108
|
+
"ref": "nixos-unstable",
|
|
109
|
+
"repo": "nixpkgs",
|
|
110
|
+
"type": "github"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"nixpkgs_4": {
|
|
114
|
+
"locked": {
|
|
115
|
+
"lastModified": 1761373498,
|
|
116
|
+
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
|
|
117
|
+
"owner": "nixos",
|
|
118
|
+
"repo": "nixpkgs",
|
|
119
|
+
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
|
|
120
|
+
"type": "github"
|
|
121
|
+
},
|
|
122
|
+
"original": {
|
|
123
|
+
"owner": "nixos",
|
|
124
|
+
"ref": "nixos-unstable",
|
|
125
|
+
"repo": "nixpkgs",
|
|
126
|
+
"type": "github"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"nixpkgs_flake": {
|
|
130
|
+
"locked": {
|
|
131
|
+
"lastModified": 1756313514,
|
|
132
|
+
"narHash": "sha256-3Xbak0pXR8ziNv1ghHyJ5a5Ti2kt/LWq6hKZVJTvjBs=",
|
|
133
|
+
"owner": "nixos",
|
|
134
|
+
"repo": "nixpkgs",
|
|
135
|
+
"rev": "181464235b2daff8725773fef43ffc9d6b02e1c2",
|
|
136
|
+
"type": "github"
|
|
137
|
+
},
|
|
138
|
+
"original": {
|
|
139
|
+
"owner": "nixos",
|
|
140
|
+
"repo": "nixpkgs",
|
|
141
|
+
"type": "github"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"observes_flake_builder": {
|
|
145
|
+
"inputs": {
|
|
146
|
+
"nix_filter": "nix_filter",
|
|
147
|
+
"nixpkgs_flake": "nixpkgs_flake",
|
|
148
|
+
"pynix_flake": "pynix_flake",
|
|
149
|
+
"pyproject-build-systems": "pyproject-build-systems",
|
|
150
|
+
"pyproject-nix": "pyproject-nix_2",
|
|
151
|
+
"shell-helpers": "shell-helpers",
|
|
152
|
+
"uv2nix": "uv2nix_2"
|
|
153
|
+
},
|
|
154
|
+
"locked": {
|
|
155
|
+
"dir": "observes/common/std_flake_2",
|
|
156
|
+
"lastModified": 1761684858,
|
|
157
|
+
"narHash": "sha256-gybMRO/MSOPXQjI//u2UKfvs8pD0sACqL2Kjp+xR4rI=",
|
|
158
|
+
"owner": "fluidattacks",
|
|
159
|
+
"repo": "universe",
|
|
160
|
+
"rev": "c5053864bb838edbe226d74a650d901c0270843b",
|
|
161
|
+
"type": "github"
|
|
162
|
+
},
|
|
163
|
+
"original": {
|
|
164
|
+
"dir": "observes/common/std_flake_2",
|
|
165
|
+
"owner": "fluidattacks",
|
|
166
|
+
"repo": "universe",
|
|
167
|
+
"rev": "c5053864bb838edbe226d74a650d901c0270843b",
|
|
168
|
+
"type": "github"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"pynix_flake": {
|
|
172
|
+
"inputs": {
|
|
173
|
+
"nix_filter": "nix_filter_2",
|
|
174
|
+
"nixpkgs": "nixpkgs"
|
|
175
|
+
},
|
|
176
|
+
"locked": {
|
|
177
|
+
"lastModified": 1758642502,
|
|
178
|
+
"narHash": "sha256-PD/bQMz2dqZSkydHyvRh+jS/0qoV8SdcIVs6sassteQ=",
|
|
179
|
+
"owner": "dmurciaatfluid",
|
|
180
|
+
"repo": "python_nix_builder",
|
|
181
|
+
"rev": "809aafe2e1995e72c15378d099bf251b78f04a20",
|
|
182
|
+
"type": "gitlab"
|
|
183
|
+
},
|
|
184
|
+
"original": {
|
|
185
|
+
"owner": "dmurciaatfluid",
|
|
186
|
+
"repo": "python_nix_builder",
|
|
187
|
+
"type": "gitlab"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"pyproject-build-systems": {
|
|
191
|
+
"inputs": {
|
|
192
|
+
"nixpkgs": "nixpkgs_2",
|
|
193
|
+
"pyproject-nix": "pyproject-nix",
|
|
194
|
+
"uv2nix": "uv2nix"
|
|
195
|
+
},
|
|
196
|
+
"locked": {
|
|
197
|
+
"lastModified": 1761781027,
|
|
198
|
+
"narHash": "sha256-YDvxPAm2WnxrznRqWwHLjryBGG5Ey1ATEJXrON+TWt8=",
|
|
199
|
+
"owner": "pyproject-nix",
|
|
200
|
+
"repo": "build-system-pkgs",
|
|
201
|
+
"rev": "795a980d25301e5133eca37adae37283ec3c8e66",
|
|
202
|
+
"type": "github"
|
|
203
|
+
},
|
|
204
|
+
"original": {
|
|
205
|
+
"owner": "pyproject-nix",
|
|
206
|
+
"repo": "build-system-pkgs",
|
|
207
|
+
"type": "github"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"pyproject-nix": {
|
|
211
|
+
"inputs": {
|
|
212
|
+
"nixpkgs": [
|
|
213
|
+
"observes_flake_builder",
|
|
214
|
+
"pyproject-build-systems",
|
|
215
|
+
"nixpkgs"
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
"locked": {
|
|
219
|
+
"lastModified": 1758265079,
|
|
220
|
+
"narHash": "sha256-amLaLNwKSZPShQHzfgmc/9o76dU8xzN0743dWgvYlr8=",
|
|
221
|
+
"owner": "nix-community",
|
|
222
|
+
"repo": "pyproject.nix",
|
|
223
|
+
"rev": "02e9418fd4af638447dca4b17b1280da95527fc9",
|
|
224
|
+
"type": "github"
|
|
225
|
+
},
|
|
226
|
+
"original": {
|
|
227
|
+
"owner": "nix-community",
|
|
228
|
+
"repo": "pyproject.nix",
|
|
229
|
+
"type": "github"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"pyproject-nix_2": {
|
|
233
|
+
"inputs": {
|
|
234
|
+
"nixpkgs": "nixpkgs_3"
|
|
235
|
+
},
|
|
236
|
+
"locked": {
|
|
237
|
+
"lastModified": 1762427963,
|
|
238
|
+
"narHash": "sha256-CkPlAbIQ87wmjy5qHibfzk4DmMGBNqFer+lLfXjpP5M=",
|
|
239
|
+
"owner": "pyproject-nix",
|
|
240
|
+
"repo": "pyproject.nix",
|
|
241
|
+
"rev": "4540ea004e04fcd12dd2738d51383d10f956f7b9",
|
|
242
|
+
"type": "github"
|
|
243
|
+
},
|
|
244
|
+
"original": {
|
|
245
|
+
"owner": "pyproject-nix",
|
|
246
|
+
"repo": "pyproject.nix",
|
|
247
|
+
"type": "github"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"pyproject-nix_3": {
|
|
251
|
+
"inputs": {
|
|
252
|
+
"nixpkgs": [
|
|
253
|
+
"observes_flake_builder",
|
|
254
|
+
"uv2nix",
|
|
255
|
+
"nixpkgs"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"locked": {
|
|
259
|
+
"lastModified": 1760402624,
|
|
260
|
+
"narHash": "sha256-jF6UKLs2uGc2rtved8Vrt58oTWjTQoAssuYs/0578Z4=",
|
|
261
|
+
"owner": "pyproject-nix",
|
|
262
|
+
"repo": "pyproject.nix",
|
|
263
|
+
"rev": "84c4ea102127c77058ea1ed7be7300261fafc7d2",
|
|
264
|
+
"type": "github"
|
|
265
|
+
},
|
|
266
|
+
"original": {
|
|
267
|
+
"owner": "pyproject-nix",
|
|
268
|
+
"repo": "pyproject.nix",
|
|
269
|
+
"type": "github"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"root": {
|
|
273
|
+
"inputs": {
|
|
274
|
+
"observes_flake_builder": "observes_flake_builder"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"shell-helpers": {
|
|
278
|
+
"inputs": {
|
|
279
|
+
"flake-parts": "flake-parts",
|
|
280
|
+
"nixpkgs": [
|
|
281
|
+
"observes_flake_builder",
|
|
282
|
+
"nixpkgs_flake"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"locked": {
|
|
286
|
+
"dir": "common/utils/shell-helpers",
|
|
287
|
+
"lastModified": 1752896460,
|
|
288
|
+
"narHash": "sha256-AsyTatXMx839cGsF6knwTrDZHk3Eue2QD3eSP7bkmpg=",
|
|
289
|
+
"owner": "fluidattacks",
|
|
290
|
+
"repo": "universe",
|
|
291
|
+
"rev": "27749d2c3a2b018eb010a322e5e1352f993c9e86",
|
|
292
|
+
"type": "github"
|
|
293
|
+
},
|
|
294
|
+
"original": {
|
|
295
|
+
"dir": "common/utils/shell-helpers",
|
|
296
|
+
"owner": "fluidattacks",
|
|
297
|
+
"repo": "universe",
|
|
298
|
+
"rev": "27749d2c3a2b018eb010a322e5e1352f993c9e86",
|
|
299
|
+
"type": "github"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"uv2nix": {
|
|
303
|
+
"inputs": {
|
|
304
|
+
"nixpkgs": [
|
|
305
|
+
"observes_flake_builder",
|
|
306
|
+
"pyproject-build-systems",
|
|
307
|
+
"nixpkgs"
|
|
308
|
+
],
|
|
309
|
+
"pyproject-nix": [
|
|
310
|
+
"observes_flake_builder",
|
|
311
|
+
"pyproject-build-systems",
|
|
312
|
+
"pyproject-nix"
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
"locked": {
|
|
316
|
+
"lastModified": 1758933732,
|
|
317
|
+
"narHash": "sha256-HAmm1GBS1myZCFuog0DC2ZLaynvZtiUI2Crmo+cdQI0=",
|
|
318
|
+
"owner": "pyproject-nix",
|
|
319
|
+
"repo": "uv2nix",
|
|
320
|
+
"rev": "273ce18f913d8559e0d04f820d724308966d7c4d",
|
|
321
|
+
"type": "github"
|
|
322
|
+
},
|
|
323
|
+
"original": {
|
|
324
|
+
"owner": "pyproject-nix",
|
|
325
|
+
"repo": "uv2nix",
|
|
326
|
+
"type": "github"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"uv2nix_2": {
|
|
330
|
+
"inputs": {
|
|
331
|
+
"nixpkgs": "nixpkgs_4",
|
|
332
|
+
"pyproject-nix": "pyproject-nix_3"
|
|
333
|
+
},
|
|
334
|
+
"locked": {
|
|
335
|
+
"lastModified": 1761872265,
|
|
336
|
+
"narHash": "sha256-i25GRgp2vUOebY70L3NTAgkd+Pr1hnn5xM3qHxH0ONU=",
|
|
337
|
+
"owner": "pyproject-nix",
|
|
338
|
+
"repo": "uv2nix",
|
|
339
|
+
"rev": "74dfb62871be152ad3673b143b0cc56105a4f3c5",
|
|
340
|
+
"type": "github"
|
|
341
|
+
},
|
|
342
|
+
"original": {
|
|
343
|
+
"owner": "pyproject-nix",
|
|
344
|
+
"repo": "uv2nix",
|
|
345
|
+
"type": "github"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"root": "root",
|
|
350
|
+
"version": 7
|
|
351
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
description = "Singer target for fluidattacks warehouse";
|
|
3
|
+
|
|
4
|
+
inputs = {
|
|
5
|
+
observes_flake_builder = {
|
|
6
|
+
url =
|
|
7
|
+
"github:fluidattacks/universe/c5053864bb838edbe226d74a650d901c0270843b?shallow=1&dir=observes/common/std_flake_2";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
outputs = { self, ... }@inputs:
|
|
12
|
+
let
|
|
13
|
+
build_args = { system, python_version, nixpkgs, builders, scripts }:
|
|
14
|
+
import ./build {
|
|
15
|
+
inherit nixpkgs builders scripts;
|
|
16
|
+
src = import ./build/filter.nix nixpkgs.nix-filter self;
|
|
17
|
+
};
|
|
18
|
+
in { packages = inputs.observes_flake_builder.outputs.build build_args; };
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
from fa_purity import (
|
|
4
|
+
Unsafe,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
from fluidattacks_gitlab_sdk._http_client import Credentials
|
|
8
|
+
|
|
9
|
+
from ._handlers import NotFound
|
|
10
|
+
from ._logger import (
|
|
11
|
+
set_logger,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__version__ = "1.0.0"
|
|
15
|
+
|
|
16
|
+
Unsafe.compute(set_logger(__name__, __version__))
|
|
17
|
+
LOG = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"Credentials",
|
|
21
|
+
"NotFound",
|
|
22
|
+
]
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
from collections.abc import Callable
|
|
2
|
+
from datetime import date
|
|
3
|
+
from typing import TypeVar
|
|
4
|
+
|
|
5
|
+
from fa_purity import (
|
|
6
|
+
Bool,
|
|
7
|
+
Coproduct,
|
|
8
|
+
CoproductFactory,
|
|
9
|
+
FrozenList,
|
|
10
|
+
Maybe,
|
|
11
|
+
NewFrozenList,
|
|
12
|
+
Result,
|
|
13
|
+
ResultE,
|
|
14
|
+
ResultSmash,
|
|
15
|
+
ResultTransform,
|
|
16
|
+
)
|
|
17
|
+
from fa_purity.json import JsonObj, JsonUnfolder
|
|
18
|
+
from fluidattacks_etl_utils import smash
|
|
19
|
+
from fluidattacks_etl_utils.decode import DecodeUtils
|
|
20
|
+
from fluidattacks_etl_utils.natural import Natural
|
|
21
|
+
|
|
22
|
+
from fluidattacks_gitlab_sdk._handlers import handle_value_error
|
|
23
|
+
from fluidattacks_gitlab_sdk.ids import (
|
|
24
|
+
EpicFullId,
|
|
25
|
+
EpicFullInternalId,
|
|
26
|
+
EpicGlobalId,
|
|
27
|
+
EpicInternalId,
|
|
28
|
+
GroupId,
|
|
29
|
+
IssueFullId,
|
|
30
|
+
IssueFullInternalId,
|
|
31
|
+
IssueGlobalId,
|
|
32
|
+
IssueInternalId,
|
|
33
|
+
MilestoneFullId,
|
|
34
|
+
MilestoneFullInternalId,
|
|
35
|
+
MilestoneGlobalId,
|
|
36
|
+
MilestoneInternalId,
|
|
37
|
+
MrFullId,
|
|
38
|
+
MrFullInternalId,
|
|
39
|
+
MrGlobalId,
|
|
40
|
+
MrInternalId,
|
|
41
|
+
ProjectId,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
_T = TypeVar("_T")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def decode_maybe_single(items: NewFrozenList[_T]) -> Maybe[_T]:
|
|
48
|
+
return Bool.from_primitive(len(items.items) <= 1).map(
|
|
49
|
+
lambda _: ResultTransform.get_index(items, 0).map(Maybe.some).value_or(Maybe.empty()),
|
|
50
|
+
lambda _: Maybe.empty(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _decode_internal_id(
|
|
55
|
+
raw: JsonObj,
|
|
56
|
+
iid_transform: Callable[[Natural], _T],
|
|
57
|
+
) -> ResultE[tuple[ProjectId, _T]]:
|
|
58
|
+
_project = (
|
|
59
|
+
JsonUnfolder.require(raw, "project_id", DecodeUtils.to_int)
|
|
60
|
+
.bind(Natural.from_int)
|
|
61
|
+
.map(ProjectId)
|
|
62
|
+
)
|
|
63
|
+
return smash.smash_result_2(
|
|
64
|
+
_project,
|
|
65
|
+
JsonUnfolder.require(raw, "iid", DecodeUtils.to_int)
|
|
66
|
+
.bind(Natural.from_int)
|
|
67
|
+
.map(iid_transform),
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _decode_id(
|
|
72
|
+
raw: JsonObj,
|
|
73
|
+
) -> ResultE[Natural]:
|
|
74
|
+
return JsonUnfolder.require(raw, "id", DecodeUtils.to_int).bind(Natural.from_int)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def decode_milestone_internal_id(raw: JsonObj) -> ResultE[MilestoneFullInternalId]:
|
|
78
|
+
_decode_project = (
|
|
79
|
+
JsonUnfolder.require(raw, "project_id", DecodeUtils.to_int)
|
|
80
|
+
.bind(Natural.from_int)
|
|
81
|
+
.map(ProjectId)
|
|
82
|
+
)
|
|
83
|
+
_decode_group = (
|
|
84
|
+
JsonUnfolder.require(raw, "group_id", DecodeUtils.to_int)
|
|
85
|
+
.bind(Natural.from_int)
|
|
86
|
+
.map(GroupId)
|
|
87
|
+
)
|
|
88
|
+
_decode_iid = (
|
|
89
|
+
JsonUnfolder.require(raw, "iid", DecodeUtils.to_int)
|
|
90
|
+
.bind(Natural.from_int)
|
|
91
|
+
.map(MilestoneInternalId)
|
|
92
|
+
)
|
|
93
|
+
_union: CoproductFactory[ProjectId, GroupId] = CoproductFactory()
|
|
94
|
+
_project_or_group = _decode_project.map(_union.inl).lash(
|
|
95
|
+
lambda _: _decode_group.map(_union.inr),
|
|
96
|
+
)
|
|
97
|
+
return ResultSmash.smash_result_2(
|
|
98
|
+
_project_or_group,
|
|
99
|
+
_decode_iid,
|
|
100
|
+
).map(lambda t: MilestoneFullInternalId(*t))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def decode_milestone_full_id(raw: JsonObj) -> ResultE[MilestoneFullId]:
|
|
104
|
+
return smash.smash_result_2(
|
|
105
|
+
_decode_id(raw).map(MilestoneGlobalId),
|
|
106
|
+
decode_milestone_internal_id(raw),
|
|
107
|
+
).map(lambda t: MilestoneFullId(*t))
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def decode_epic_internal_id(raw: JsonObj) -> ResultE[EpicFullInternalId]:
|
|
111
|
+
_decode_group = (
|
|
112
|
+
JsonUnfolder.require(raw, "group_id", DecodeUtils.to_int)
|
|
113
|
+
.bind(Natural.from_int)
|
|
114
|
+
.map(GroupId)
|
|
115
|
+
)
|
|
116
|
+
_decode_iid = (
|
|
117
|
+
JsonUnfolder.require(raw, "iid", DecodeUtils.to_int)
|
|
118
|
+
.bind(Natural.from_int)
|
|
119
|
+
.map(EpicInternalId)
|
|
120
|
+
)
|
|
121
|
+
return ResultSmash.smash_result_2(
|
|
122
|
+
_decode_group,
|
|
123
|
+
_decode_iid,
|
|
124
|
+
).map(lambda t: EpicFullInternalId(*t))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def decode_epic_full_id(raw: JsonObj) -> ResultE[EpicFullId]:
|
|
128
|
+
return smash.smash_result_2(
|
|
129
|
+
_decode_id(raw).map(EpicGlobalId),
|
|
130
|
+
decode_epic_internal_id(raw),
|
|
131
|
+
).map(lambda t: EpicFullId(*t))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def decode_mr_internal_id(raw: JsonObj) -> ResultE[MrFullInternalId]:
|
|
135
|
+
return _decode_internal_id(raw, MrInternalId).map(lambda t: MrFullInternalId(*t))
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def decode_mr_full_id(raw: JsonObj) -> ResultE[MrFullId]:
|
|
139
|
+
return smash.smash_result_2(_decode_id(raw).map(MrGlobalId), decode_mr_internal_id(raw)).map(
|
|
140
|
+
lambda t: MrFullId(*t),
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def decode_issue_internal_id(raw: JsonObj) -> ResultE[IssueFullInternalId]:
|
|
145
|
+
return _decode_internal_id(raw, IssueInternalId).map(lambda t: IssueFullInternalId(*t))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def decode_issue_full_id(raw: JsonObj) -> ResultE[IssueFullId]:
|
|
149
|
+
return smash.smash_result_2(
|
|
150
|
+
_decode_id(raw).map(IssueGlobalId),
|
|
151
|
+
decode_issue_internal_id(raw),
|
|
152
|
+
).map(lambda t: IssueFullId(*t))
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def decode_date(raw: str) -> ResultE[date]:
|
|
156
|
+
return handle_value_error(lambda: date.fromisoformat(raw))
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def assert_single(item: Coproduct[JsonObj, FrozenList[JsonObj]]) -> ResultE[JsonObj]:
|
|
160
|
+
return item.map(
|
|
161
|
+
Result.success,
|
|
162
|
+
lambda _: Result.failure(ValueError("Expected a json not a list")),
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def assert_multiple(item: Coproduct[JsonObj, FrozenList[JsonObj]]) -> ResultE[FrozenList[JsonObj]]:
|
|
167
|
+
return item.map(
|
|
168
|
+
lambda _: Result.failure(ValueError("Expected a json list not a single json")),
|
|
169
|
+
Result.success,
|
|
170
|
+
)
|