levelfour 0.1.0__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.
- levelfour/__init__.py +495 -0
- levelfour/api_keys/__init__.py +34 -0
- levelfour/api_keys/client.py +337 -0
- levelfour/api_keys/raw_client.py +621 -0
- levelfour/api_keys/types/__init__.py +34 -0
- levelfour/api_keys/types/create_api_key_request_scope.py +5 -0
- levelfour/async_levelfour_client.py +39 -0
- levelfour/base_client.py +346 -0
- levelfour/client.py +54 -0
- levelfour/core/__init__.py +127 -0
- levelfour/core/api_error.py +23 -0
- levelfour/core/client_wrapper.py +105 -0
- levelfour/core/datetime_utils.py +70 -0
- levelfour/core/file.py +67 -0
- levelfour/core/force_multipart.py +18 -0
- levelfour/core/http_client.py +776 -0
- levelfour/core/http_response.py +59 -0
- levelfour/core/http_sse/__init__.py +42 -0
- levelfour/core/http_sse/_api.py +112 -0
- levelfour/core/http_sse/_decoders.py +61 -0
- levelfour/core/http_sse/_exceptions.py +7 -0
- levelfour/core/http_sse/_models.py +17 -0
- levelfour/core/jsonable_encoder.py +108 -0
- levelfour/core/logging.py +107 -0
- levelfour/core/pagination.py +82 -0
- levelfour/core/pydantic_utilities.py +577 -0
- levelfour/core/query_encoder.py +58 -0
- levelfour/core/remove_none_from_dict.py +11 -0
- levelfour/core/request_options.py +35 -0
- levelfour/core/serialization.py +276 -0
- levelfour/errors/__init__.py +40 -0
- levelfour/errors/forbidden_error.py +11 -0
- levelfour/errors/unauthorized_error.py +11 -0
- levelfour/errors/unprocessable_entity_error.py +11 -0
- levelfour/evaluation/__init__.py +4 -0
- levelfour/evaluation/client.py +102 -0
- levelfour/evaluation/raw_client.py +141 -0
- levelfour/exceptions.py +63 -0
- levelfour/health/__init__.py +4 -0
- levelfour/health/client.py +163 -0
- levelfour/health/raw_client.py +164 -0
- levelfour/integrations/__init__.py +0 -0
- levelfour/integrations/django.py +26 -0
- levelfour/integrations/fastapi.py +39 -0
- levelfour/integrations/telemetry.py +66 -0
- levelfour/levelfour_client.py +47 -0
- levelfour/pagination.py +84 -0
- levelfour/pr_analysis/__init__.py +4 -0
- levelfour/pr_analysis/client.py +408 -0
- levelfour/pr_analysis/raw_client.py +620 -0
- levelfour/pr_analysis_actions/__init__.py +4 -0
- levelfour/pr_analysis_actions/client.py +588 -0
- levelfour/pr_analysis_actions/raw_client.py +939 -0
- levelfour/pr_analysis_installations/__init__.py +4 -0
- levelfour/pr_analysis_installations/client.py +470 -0
- levelfour/pr_analysis_installations/raw_client.py +868 -0
- levelfour/providers/__init__.py +34 -0
- levelfour/providers/client.py +1504 -0
- levelfour/providers/raw_client.py +2398 -0
- levelfour/providers/types/__init__.py +36 -0
- levelfour/providers/types/list_spending_breakdown_providers_response.py +11 -0
- levelfour/py.typed +0 -0
- levelfour/recommendations/__init__.py +4 -0
- levelfour/recommendations/client.py +1018 -0
- levelfour/recommendations/raw_client.py +1810 -0
- levelfour/savings/__init__.py +4 -0
- levelfour/savings/client.py +401 -0
- levelfour/savings/raw_client.py +624 -0
- levelfour/spending/__init__.py +34 -0
- levelfour/spending/client.py +437 -0
- levelfour/spending/raw_client.py +684 -0
- levelfour/spending/types/__init__.py +34 -0
- levelfour/spending/types/list_breakdown_spending_response.py +12 -0
- levelfour/types/__init__.py +413 -0
- levelfour/types/accept_terms_data.py +25 -0
- levelfour/types/accept_terms_response.py +27 -0
- levelfour/types/action_request.py +42 -0
- levelfour/types/api_key_created_data.py +28 -0
- levelfour/types/api_key_data.py +27 -0
- levelfour/types/authentication_error.py +5 -0
- levelfour/types/authorization_error.py +5 -0
- levelfour/types/bad_request_error.py +5 -0
- levelfour/types/comparison_item.py +32 -0
- levelfour/types/complete_wizard_data.py +27 -0
- levelfour/types/complete_wizard_response.py +27 -0
- levelfour/types/conflict_error.py +5 -0
- levelfour/types/cost_breakdown_data.py +35 -0
- levelfour/types/cost_breakdown_item.py +71 -0
- levelfour/types/cost_breakdown_raw_data.py +37 -0
- levelfour/types/cost_breakdown_raw_response.py +27 -0
- levelfour/types/cost_breakdown_response.py +27 -0
- levelfour/types/costs_breakdown_chart_data.py +48 -0
- levelfour/types/costs_breakdown_chart_response.py +27 -0
- levelfour/types/costs_breakdown_data_point.py +46 -0
- levelfour/types/costs_breakdown_grouped_chart_data.py +52 -0
- levelfour/types/costs_breakdown_grouped_chart_response.py +27 -0
- levelfour/types/costs_breakdown_grouped_data_point.py +36 -0
- levelfour/types/costs_breakdown_totals.py +41 -0
- levelfour/types/create_api_key_response.py +23 -0
- levelfour/types/daily_spending_breakdown_data.py +42 -0
- levelfour/types/daily_spending_breakdown_response.py +27 -0
- levelfour/types/daily_spending_data_point.py +31 -0
- levelfour/types/dashboard_summary_data.py +72 -0
- levelfour/types/dashboard_summary_response.py +27 -0
- levelfour/types/delete_endpoint_data.py +20 -0
- levelfour/types/delete_endpoint_response.py +23 -0
- levelfour/types/endpoint_data.py +23 -0
- levelfour/types/error_response.py +23 -0
- levelfour/types/error_response_error.py +21 -0
- levelfour/types/evaluation_status_data.py +71 -0
- levelfour/types/evaluation_status_response.py +27 -0
- levelfour/types/execution_log_command.py +21 -0
- levelfour/types/execution_log_entry.py +23 -0
- levelfour/types/execution_step_schema.py +23 -0
- levelfour/types/http_validation_error.py +20 -0
- levelfour/types/implementation_method_data.py +25 -0
- levelfour/types/implementation_method_response.py +27 -0
- levelfour/types/implementation_step.py +27 -0
- levelfour/types/internal_server_error.py +5 -0
- levelfour/types/list_api_keys_data.py +21 -0
- levelfour/types/list_api_keys_response.py +23 -0
- levelfour/types/list_endpoints_response.py +23 -0
- levelfour/types/metric_data_point.py +27 -0
- levelfour/types/metric_series.py +40 -0
- levelfour/types/metric_series_entry.py +25 -0
- levelfour/types/monthly_spending_data.py +27 -0
- levelfour/types/monthly_spending_data_point.py +31 -0
- levelfour/types/monthly_spending_response.py +27 -0
- levelfour/types/not_found_error.py +5 -0
- levelfour/types/pagination_meta.py +51 -0
- levelfour/types/processing_recommendation_item.py +61 -0
- levelfour/types/processing_recommendations_data.py +28 -0
- levelfour/types/processing_recommendations_response.py +27 -0
- levelfour/types/provider.py +46 -0
- levelfour/types/provider_breakdown_data.py +31 -0
- levelfour/types/provider_breakdown_item.py +77 -0
- levelfour/types/provider_breakdown_response.py +27 -0
- levelfour/types/provider_filter_options_data.py +51 -0
- levelfour/types/provider_filter_options_response.py +27 -0
- levelfour/types/provider_potential_savings_summary_data.py +46 -0
- levelfour/types/provider_potential_savings_summary_response.py +27 -0
- levelfour/types/provider_recommendations_summary_data.py +37 -0
- levelfour/types/provider_recommendations_summary_response.py +27 -0
- levelfour/types/provider_saved_summary_data.py +56 -0
- levelfour/types/provider_saved_summary_response.py +27 -0
- levelfour/types/provider_service_breakdown_data.py +65 -0
- levelfour/types/provider_service_breakdown_item.py +72 -0
- levelfour/types/provider_service_breakdown_raw_data.py +62 -0
- levelfour/types/provider_service_breakdown_raw_response.py +27 -0
- levelfour/types/provider_service_breakdown_response.py +27 -0
- levelfour/types/provider_service_costs_breakdown_data.py +62 -0
- levelfour/types/provider_service_costs_breakdown_response.py +27 -0
- levelfour/types/provider_service_costs_data_point.py +36 -0
- levelfour/types/provider_spending.py +61 -0
- levelfour/types/provider_spending_summary_data.py +67 -0
- levelfour/types/provider_spending_summary_response.py +27 -0
- levelfour/types/provider_timeline_data.py +57 -0
- levelfour/types/provider_timeline_response.py +27 -0
- levelfour/types/provider_top_service.py +36 -0
- levelfour/types/providers_summary_data.py +24 -0
- levelfour/types/providers_summary_response.py +27 -0
- levelfour/types/rate_limit_error.py +5 -0
- levelfour/types/recommendation_actions.py +60 -0
- levelfour/types/recommendation_detail.py +42 -0
- levelfour/types/recommendation_detail_response.py +27 -0
- levelfour/types/recommendation_filter_options_data.py +41 -0
- levelfour/types/recommendation_filter_options_response.py +27 -0
- levelfour/types/recommendation_item.py +36 -0
- levelfour/types/recommendation_wizard_data.py +173 -0
- levelfour/types/recommendation_wizard_data_metrics.py +7 -0
- levelfour/types/recommendation_wizard_response.py +27 -0
- levelfour/types/recommendations_breakdown_data.py +26 -0
- levelfour/types/recommendations_breakdown_response.py +27 -0
- levelfour/types/recommendations_overview_data.py +51 -0
- levelfour/types/recommendations_overview_response.py +27 -0
- levelfour/types/register_endpoint_response.py +23 -0
- levelfour/types/resource_change.py +42 -0
- levelfour/types/resource_snapshot.py +21 -0
- levelfour/types/revoke_api_key_data.py +20 -0
- levelfour/types/revoke_api_key_response.py +23 -0
- levelfour/types/risk_assessment.py +29 -0
- levelfour/types/risk_factor.py +27 -0
- levelfour/types/saved_breakdown_data.py +31 -0
- levelfour/types/saved_breakdown_response.py +27 -0
- levelfour/types/saved_by_provider_breakdown_data.py +31 -0
- levelfour/types/saved_by_provider_breakdown_response.py +27 -0
- levelfour/types/saved_by_provider_item.py +76 -0
- levelfour/types/saved_item.py +35 -0
- levelfour/types/saved_provider_summary.py +36 -0
- levelfour/types/saved_summary_data.py +57 -0
- levelfour/types/saved_summary_response.py +27 -0
- levelfour/types/savings_decision_data.py +28 -0
- levelfour/types/savings_decision_response.py +27 -0
- levelfour/types/spending_by_date_item.py +36 -0
- levelfour/types/top_recommendation.py +56 -0
- levelfour/types/trigger_info.py +22 -0
- levelfour/types/update_tag_data.py +20 -0
- levelfour/types/update_tag_response.py +23 -0
- levelfour/types/validation_error.py +24 -0
- levelfour/types/validation_error_loc_item.py +5 -0
- levelfour/webhooks/__init__.py +4 -0
- levelfour/webhooks/client.py +273 -0
- levelfour/webhooks/raw_client.py +483 -0
- levelfour/webhooks/verifier.py +61 -0
- levelfour-0.1.0.dist-info/METADATA +12 -0
- levelfour-0.1.0.dist-info/RECORD +208 -0
- levelfour-0.1.0.dist-info/WHEEL +5 -0
- levelfour-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from .raw_client import AsyncRawPrAnalysisActionsClient, RawPrAnalysisActionsClient
|
|
8
|
+
|
|
9
|
+
# this is used as the default value for optional parameters
|
|
10
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PrAnalysisActionsClient:
|
|
14
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
15
|
+
self._raw_client = RawPrAnalysisActionsClient(client_wrapper=client_wrapper)
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def with_raw_response(self) -> RawPrAnalysisActionsClient:
|
|
19
|
+
"""
|
|
20
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
21
|
+
|
|
22
|
+
Returns
|
|
23
|
+
-------
|
|
24
|
+
RawPrAnalysisActionsClient
|
|
25
|
+
"""
|
|
26
|
+
return self._raw_client
|
|
27
|
+
|
|
28
|
+
def dismiss(
|
|
29
|
+
self,
|
|
30
|
+
*,
|
|
31
|
+
repository: str,
|
|
32
|
+
pr_number: int,
|
|
33
|
+
reason: str,
|
|
34
|
+
performed_by: str,
|
|
35
|
+
head_sha: str,
|
|
36
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
37
|
+
) -> typing.Any:
|
|
38
|
+
"""
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
repository : str
|
|
42
|
+
GitHub repository full name, e.g. acme/infrastructure
|
|
43
|
+
|
|
44
|
+
pr_number : int
|
|
45
|
+
Pull request number
|
|
46
|
+
|
|
47
|
+
reason : str
|
|
48
|
+
User-provided reason for the action
|
|
49
|
+
|
|
50
|
+
performed_by : str
|
|
51
|
+
GitHub username who performed the action
|
|
52
|
+
|
|
53
|
+
head_sha : str
|
|
54
|
+
HEAD commit SHA at time of action
|
|
55
|
+
|
|
56
|
+
request_options : typing.Optional[RequestOptions]
|
|
57
|
+
Request-specific configuration.
|
|
58
|
+
|
|
59
|
+
Returns
|
|
60
|
+
-------
|
|
61
|
+
typing.Any
|
|
62
|
+
Successful Response
|
|
63
|
+
|
|
64
|
+
Examples
|
|
65
|
+
--------
|
|
66
|
+
from levelfour import BaseLevelFour
|
|
67
|
+
|
|
68
|
+
client = BaseLevelFour(
|
|
69
|
+
token="YOUR_TOKEN",
|
|
70
|
+
base_url="https://yourhost.com/path/to/api",
|
|
71
|
+
)
|
|
72
|
+
client.pr_analysis_actions.dismiss(
|
|
73
|
+
repository="repository",
|
|
74
|
+
pr_number=1,
|
|
75
|
+
reason="reason",
|
|
76
|
+
performed_by="performed_by",
|
|
77
|
+
head_sha="head_sha",
|
|
78
|
+
)
|
|
79
|
+
"""
|
|
80
|
+
_response = self._raw_client.dismiss(
|
|
81
|
+
repository=repository,
|
|
82
|
+
pr_number=pr_number,
|
|
83
|
+
reason=reason,
|
|
84
|
+
performed_by=performed_by,
|
|
85
|
+
head_sha=head_sha,
|
|
86
|
+
request_options=request_options,
|
|
87
|
+
)
|
|
88
|
+
return _response.data
|
|
89
|
+
|
|
90
|
+
def snooze(
|
|
91
|
+
self,
|
|
92
|
+
*,
|
|
93
|
+
repository: str,
|
|
94
|
+
pr_number: int,
|
|
95
|
+
reason: str,
|
|
96
|
+
performed_by: str,
|
|
97
|
+
head_sha: str,
|
|
98
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
99
|
+
) -> typing.Any:
|
|
100
|
+
"""
|
|
101
|
+
Parameters
|
|
102
|
+
----------
|
|
103
|
+
repository : str
|
|
104
|
+
GitHub repository full name, e.g. acme/infrastructure
|
|
105
|
+
|
|
106
|
+
pr_number : int
|
|
107
|
+
Pull request number
|
|
108
|
+
|
|
109
|
+
reason : str
|
|
110
|
+
User-provided reason for the action
|
|
111
|
+
|
|
112
|
+
performed_by : str
|
|
113
|
+
GitHub username who performed the action
|
|
114
|
+
|
|
115
|
+
head_sha : str
|
|
116
|
+
HEAD commit SHA at time of action
|
|
117
|
+
|
|
118
|
+
request_options : typing.Optional[RequestOptions]
|
|
119
|
+
Request-specific configuration.
|
|
120
|
+
|
|
121
|
+
Returns
|
|
122
|
+
-------
|
|
123
|
+
typing.Any
|
|
124
|
+
Successful Response
|
|
125
|
+
|
|
126
|
+
Examples
|
|
127
|
+
--------
|
|
128
|
+
from levelfour import BaseLevelFour
|
|
129
|
+
|
|
130
|
+
client = BaseLevelFour(
|
|
131
|
+
token="YOUR_TOKEN",
|
|
132
|
+
base_url="https://yourhost.com/path/to/api",
|
|
133
|
+
)
|
|
134
|
+
client.pr_analysis_actions.snooze(
|
|
135
|
+
repository="repository",
|
|
136
|
+
pr_number=1,
|
|
137
|
+
reason="reason",
|
|
138
|
+
performed_by="performed_by",
|
|
139
|
+
head_sha="head_sha",
|
|
140
|
+
)
|
|
141
|
+
"""
|
|
142
|
+
_response = self._raw_client.snooze(
|
|
143
|
+
repository=repository,
|
|
144
|
+
pr_number=pr_number,
|
|
145
|
+
reason=reason,
|
|
146
|
+
performed_by=performed_by,
|
|
147
|
+
head_sha=head_sha,
|
|
148
|
+
request_options=request_options,
|
|
149
|
+
)
|
|
150
|
+
return _response.data
|
|
151
|
+
|
|
152
|
+
def get_status(
|
|
153
|
+
self, *, repository: str, pr_number: int, request_options: typing.Optional[RequestOptions] = None
|
|
154
|
+
) -> typing.Any:
|
|
155
|
+
"""
|
|
156
|
+
Parameters
|
|
157
|
+
----------
|
|
158
|
+
repository : str
|
|
159
|
+
|
|
160
|
+
pr_number : int
|
|
161
|
+
|
|
162
|
+
request_options : typing.Optional[RequestOptions]
|
|
163
|
+
Request-specific configuration.
|
|
164
|
+
|
|
165
|
+
Returns
|
|
166
|
+
-------
|
|
167
|
+
typing.Any
|
|
168
|
+
Successful Response
|
|
169
|
+
|
|
170
|
+
Examples
|
|
171
|
+
--------
|
|
172
|
+
from levelfour import BaseLevelFour
|
|
173
|
+
|
|
174
|
+
client = BaseLevelFour(
|
|
175
|
+
token="YOUR_TOKEN",
|
|
176
|
+
base_url="https://yourhost.com/path/to/api",
|
|
177
|
+
)
|
|
178
|
+
client.pr_analysis_actions.get_status(
|
|
179
|
+
repository="repository",
|
|
180
|
+
pr_number=1,
|
|
181
|
+
)
|
|
182
|
+
"""
|
|
183
|
+
_response = self._raw_client.get_status(
|
|
184
|
+
repository=repository, pr_number=pr_number, request_options=request_options
|
|
185
|
+
)
|
|
186
|
+
return _response.data
|
|
187
|
+
|
|
188
|
+
def get_ignored(
|
|
189
|
+
self, *, repository: str, pr_number: int, request_options: typing.Optional[RequestOptions] = None
|
|
190
|
+
) -> typing.Any:
|
|
191
|
+
"""
|
|
192
|
+
Parameters
|
|
193
|
+
----------
|
|
194
|
+
repository : str
|
|
195
|
+
|
|
196
|
+
pr_number : int
|
|
197
|
+
|
|
198
|
+
request_options : typing.Optional[RequestOptions]
|
|
199
|
+
Request-specific configuration.
|
|
200
|
+
|
|
201
|
+
Returns
|
|
202
|
+
-------
|
|
203
|
+
typing.Any
|
|
204
|
+
Successful Response
|
|
205
|
+
|
|
206
|
+
Examples
|
|
207
|
+
--------
|
|
208
|
+
from levelfour import BaseLevelFour
|
|
209
|
+
|
|
210
|
+
client = BaseLevelFour(
|
|
211
|
+
token="YOUR_TOKEN",
|
|
212
|
+
base_url="https://yourhost.com/path/to/api",
|
|
213
|
+
)
|
|
214
|
+
client.pr_analysis_actions.get_ignored(
|
|
215
|
+
repository="repository",
|
|
216
|
+
pr_number=1,
|
|
217
|
+
)
|
|
218
|
+
"""
|
|
219
|
+
_response = self._raw_client.get_ignored(
|
|
220
|
+
repository=repository, pr_number=pr_number, request_options=request_options
|
|
221
|
+
)
|
|
222
|
+
return _response.data
|
|
223
|
+
|
|
224
|
+
def ignore(
|
|
225
|
+
self,
|
|
226
|
+
*,
|
|
227
|
+
repository: str,
|
|
228
|
+
pr_number: int,
|
|
229
|
+
resource_key: str,
|
|
230
|
+
performed_by: str,
|
|
231
|
+
head_sha: str,
|
|
232
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
233
|
+
) -> typing.Any:
|
|
234
|
+
"""
|
|
235
|
+
Parameters
|
|
236
|
+
----------
|
|
237
|
+
repository : str
|
|
238
|
+
|
|
239
|
+
pr_number : int
|
|
240
|
+
|
|
241
|
+
resource_key : str
|
|
242
|
+
|
|
243
|
+
performed_by : str
|
|
244
|
+
|
|
245
|
+
head_sha : str
|
|
246
|
+
|
|
247
|
+
request_options : typing.Optional[RequestOptions]
|
|
248
|
+
Request-specific configuration.
|
|
249
|
+
|
|
250
|
+
Returns
|
|
251
|
+
-------
|
|
252
|
+
typing.Any
|
|
253
|
+
Successful Response
|
|
254
|
+
|
|
255
|
+
Examples
|
|
256
|
+
--------
|
|
257
|
+
from levelfour import BaseLevelFour
|
|
258
|
+
|
|
259
|
+
client = BaseLevelFour(
|
|
260
|
+
token="YOUR_TOKEN",
|
|
261
|
+
base_url="https://yourhost.com/path/to/api",
|
|
262
|
+
)
|
|
263
|
+
client.pr_analysis_actions.ignore(
|
|
264
|
+
repository="repository",
|
|
265
|
+
pr_number=1,
|
|
266
|
+
resource_key="resource_key",
|
|
267
|
+
performed_by="performed_by",
|
|
268
|
+
head_sha="head_sha",
|
|
269
|
+
)
|
|
270
|
+
"""
|
|
271
|
+
_response = self._raw_client.ignore(
|
|
272
|
+
repository=repository,
|
|
273
|
+
pr_number=pr_number,
|
|
274
|
+
resource_key=resource_key,
|
|
275
|
+
performed_by=performed_by,
|
|
276
|
+
head_sha=head_sha,
|
|
277
|
+
request_options=request_options,
|
|
278
|
+
)
|
|
279
|
+
return _response.data
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
class AsyncPrAnalysisActionsClient:
|
|
283
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
284
|
+
self._raw_client = AsyncRawPrAnalysisActionsClient(client_wrapper=client_wrapper)
|
|
285
|
+
|
|
286
|
+
@property
|
|
287
|
+
def with_raw_response(self) -> AsyncRawPrAnalysisActionsClient:
|
|
288
|
+
"""
|
|
289
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
290
|
+
|
|
291
|
+
Returns
|
|
292
|
+
-------
|
|
293
|
+
AsyncRawPrAnalysisActionsClient
|
|
294
|
+
"""
|
|
295
|
+
return self._raw_client
|
|
296
|
+
|
|
297
|
+
async def dismiss(
|
|
298
|
+
self,
|
|
299
|
+
*,
|
|
300
|
+
repository: str,
|
|
301
|
+
pr_number: int,
|
|
302
|
+
reason: str,
|
|
303
|
+
performed_by: str,
|
|
304
|
+
head_sha: str,
|
|
305
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
306
|
+
) -> typing.Any:
|
|
307
|
+
"""
|
|
308
|
+
Parameters
|
|
309
|
+
----------
|
|
310
|
+
repository : str
|
|
311
|
+
GitHub repository full name, e.g. acme/infrastructure
|
|
312
|
+
|
|
313
|
+
pr_number : int
|
|
314
|
+
Pull request number
|
|
315
|
+
|
|
316
|
+
reason : str
|
|
317
|
+
User-provided reason for the action
|
|
318
|
+
|
|
319
|
+
performed_by : str
|
|
320
|
+
GitHub username who performed the action
|
|
321
|
+
|
|
322
|
+
head_sha : str
|
|
323
|
+
HEAD commit SHA at time of action
|
|
324
|
+
|
|
325
|
+
request_options : typing.Optional[RequestOptions]
|
|
326
|
+
Request-specific configuration.
|
|
327
|
+
|
|
328
|
+
Returns
|
|
329
|
+
-------
|
|
330
|
+
typing.Any
|
|
331
|
+
Successful Response
|
|
332
|
+
|
|
333
|
+
Examples
|
|
334
|
+
--------
|
|
335
|
+
import asyncio
|
|
336
|
+
|
|
337
|
+
from levelfour import AsyncBaseLevelFour
|
|
338
|
+
|
|
339
|
+
client = AsyncBaseLevelFour(
|
|
340
|
+
token="YOUR_TOKEN",
|
|
341
|
+
base_url="https://yourhost.com/path/to/api",
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
async def main() -> None:
|
|
346
|
+
await client.pr_analysis_actions.dismiss(
|
|
347
|
+
repository="repository",
|
|
348
|
+
pr_number=1,
|
|
349
|
+
reason="reason",
|
|
350
|
+
performed_by="performed_by",
|
|
351
|
+
head_sha="head_sha",
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
asyncio.run(main())
|
|
356
|
+
"""
|
|
357
|
+
_response = await self._raw_client.dismiss(
|
|
358
|
+
repository=repository,
|
|
359
|
+
pr_number=pr_number,
|
|
360
|
+
reason=reason,
|
|
361
|
+
performed_by=performed_by,
|
|
362
|
+
head_sha=head_sha,
|
|
363
|
+
request_options=request_options,
|
|
364
|
+
)
|
|
365
|
+
return _response.data
|
|
366
|
+
|
|
367
|
+
async def snooze(
|
|
368
|
+
self,
|
|
369
|
+
*,
|
|
370
|
+
repository: str,
|
|
371
|
+
pr_number: int,
|
|
372
|
+
reason: str,
|
|
373
|
+
performed_by: str,
|
|
374
|
+
head_sha: str,
|
|
375
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
376
|
+
) -> typing.Any:
|
|
377
|
+
"""
|
|
378
|
+
Parameters
|
|
379
|
+
----------
|
|
380
|
+
repository : str
|
|
381
|
+
GitHub repository full name, e.g. acme/infrastructure
|
|
382
|
+
|
|
383
|
+
pr_number : int
|
|
384
|
+
Pull request number
|
|
385
|
+
|
|
386
|
+
reason : str
|
|
387
|
+
User-provided reason for the action
|
|
388
|
+
|
|
389
|
+
performed_by : str
|
|
390
|
+
GitHub username who performed the action
|
|
391
|
+
|
|
392
|
+
head_sha : str
|
|
393
|
+
HEAD commit SHA at time of action
|
|
394
|
+
|
|
395
|
+
request_options : typing.Optional[RequestOptions]
|
|
396
|
+
Request-specific configuration.
|
|
397
|
+
|
|
398
|
+
Returns
|
|
399
|
+
-------
|
|
400
|
+
typing.Any
|
|
401
|
+
Successful Response
|
|
402
|
+
|
|
403
|
+
Examples
|
|
404
|
+
--------
|
|
405
|
+
import asyncio
|
|
406
|
+
|
|
407
|
+
from levelfour import AsyncBaseLevelFour
|
|
408
|
+
|
|
409
|
+
client = AsyncBaseLevelFour(
|
|
410
|
+
token="YOUR_TOKEN",
|
|
411
|
+
base_url="https://yourhost.com/path/to/api",
|
|
412
|
+
)
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
async def main() -> None:
|
|
416
|
+
await client.pr_analysis_actions.snooze(
|
|
417
|
+
repository="repository",
|
|
418
|
+
pr_number=1,
|
|
419
|
+
reason="reason",
|
|
420
|
+
performed_by="performed_by",
|
|
421
|
+
head_sha="head_sha",
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
asyncio.run(main())
|
|
426
|
+
"""
|
|
427
|
+
_response = await self._raw_client.snooze(
|
|
428
|
+
repository=repository,
|
|
429
|
+
pr_number=pr_number,
|
|
430
|
+
reason=reason,
|
|
431
|
+
performed_by=performed_by,
|
|
432
|
+
head_sha=head_sha,
|
|
433
|
+
request_options=request_options,
|
|
434
|
+
)
|
|
435
|
+
return _response.data
|
|
436
|
+
|
|
437
|
+
async def get_status(
|
|
438
|
+
self, *, repository: str, pr_number: int, request_options: typing.Optional[RequestOptions] = None
|
|
439
|
+
) -> typing.Any:
|
|
440
|
+
"""
|
|
441
|
+
Parameters
|
|
442
|
+
----------
|
|
443
|
+
repository : str
|
|
444
|
+
|
|
445
|
+
pr_number : int
|
|
446
|
+
|
|
447
|
+
request_options : typing.Optional[RequestOptions]
|
|
448
|
+
Request-specific configuration.
|
|
449
|
+
|
|
450
|
+
Returns
|
|
451
|
+
-------
|
|
452
|
+
typing.Any
|
|
453
|
+
Successful Response
|
|
454
|
+
|
|
455
|
+
Examples
|
|
456
|
+
--------
|
|
457
|
+
import asyncio
|
|
458
|
+
|
|
459
|
+
from levelfour import AsyncBaseLevelFour
|
|
460
|
+
|
|
461
|
+
client = AsyncBaseLevelFour(
|
|
462
|
+
token="YOUR_TOKEN",
|
|
463
|
+
base_url="https://yourhost.com/path/to/api",
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
async def main() -> None:
|
|
468
|
+
await client.pr_analysis_actions.get_status(
|
|
469
|
+
repository="repository",
|
|
470
|
+
pr_number=1,
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
asyncio.run(main())
|
|
475
|
+
"""
|
|
476
|
+
_response = await self._raw_client.get_status(
|
|
477
|
+
repository=repository, pr_number=pr_number, request_options=request_options
|
|
478
|
+
)
|
|
479
|
+
return _response.data
|
|
480
|
+
|
|
481
|
+
async def get_ignored(
|
|
482
|
+
self, *, repository: str, pr_number: int, request_options: typing.Optional[RequestOptions] = None
|
|
483
|
+
) -> typing.Any:
|
|
484
|
+
"""
|
|
485
|
+
Parameters
|
|
486
|
+
----------
|
|
487
|
+
repository : str
|
|
488
|
+
|
|
489
|
+
pr_number : int
|
|
490
|
+
|
|
491
|
+
request_options : typing.Optional[RequestOptions]
|
|
492
|
+
Request-specific configuration.
|
|
493
|
+
|
|
494
|
+
Returns
|
|
495
|
+
-------
|
|
496
|
+
typing.Any
|
|
497
|
+
Successful Response
|
|
498
|
+
|
|
499
|
+
Examples
|
|
500
|
+
--------
|
|
501
|
+
import asyncio
|
|
502
|
+
|
|
503
|
+
from levelfour import AsyncBaseLevelFour
|
|
504
|
+
|
|
505
|
+
client = AsyncBaseLevelFour(
|
|
506
|
+
token="YOUR_TOKEN",
|
|
507
|
+
base_url="https://yourhost.com/path/to/api",
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
async def main() -> None:
|
|
512
|
+
await client.pr_analysis_actions.get_ignored(
|
|
513
|
+
repository="repository",
|
|
514
|
+
pr_number=1,
|
|
515
|
+
)
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
asyncio.run(main())
|
|
519
|
+
"""
|
|
520
|
+
_response = await self._raw_client.get_ignored(
|
|
521
|
+
repository=repository, pr_number=pr_number, request_options=request_options
|
|
522
|
+
)
|
|
523
|
+
return _response.data
|
|
524
|
+
|
|
525
|
+
async def ignore(
|
|
526
|
+
self,
|
|
527
|
+
*,
|
|
528
|
+
repository: str,
|
|
529
|
+
pr_number: int,
|
|
530
|
+
resource_key: str,
|
|
531
|
+
performed_by: str,
|
|
532
|
+
head_sha: str,
|
|
533
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
534
|
+
) -> typing.Any:
|
|
535
|
+
"""
|
|
536
|
+
Parameters
|
|
537
|
+
----------
|
|
538
|
+
repository : str
|
|
539
|
+
|
|
540
|
+
pr_number : int
|
|
541
|
+
|
|
542
|
+
resource_key : str
|
|
543
|
+
|
|
544
|
+
performed_by : str
|
|
545
|
+
|
|
546
|
+
head_sha : str
|
|
547
|
+
|
|
548
|
+
request_options : typing.Optional[RequestOptions]
|
|
549
|
+
Request-specific configuration.
|
|
550
|
+
|
|
551
|
+
Returns
|
|
552
|
+
-------
|
|
553
|
+
typing.Any
|
|
554
|
+
Successful Response
|
|
555
|
+
|
|
556
|
+
Examples
|
|
557
|
+
--------
|
|
558
|
+
import asyncio
|
|
559
|
+
|
|
560
|
+
from levelfour import AsyncBaseLevelFour
|
|
561
|
+
|
|
562
|
+
client = AsyncBaseLevelFour(
|
|
563
|
+
token="YOUR_TOKEN",
|
|
564
|
+
base_url="https://yourhost.com/path/to/api",
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
async def main() -> None:
|
|
569
|
+
await client.pr_analysis_actions.ignore(
|
|
570
|
+
repository="repository",
|
|
571
|
+
pr_number=1,
|
|
572
|
+
resource_key="resource_key",
|
|
573
|
+
performed_by="performed_by",
|
|
574
|
+
head_sha="head_sha",
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
asyncio.run(main())
|
|
579
|
+
"""
|
|
580
|
+
_response = await self._raw_client.ignore(
|
|
581
|
+
repository=repository,
|
|
582
|
+
pr_number=pr_number,
|
|
583
|
+
resource_key=resource_key,
|
|
584
|
+
performed_by=performed_by,
|
|
585
|
+
head_sha=head_sha,
|
|
586
|
+
request_options=request_options,
|
|
587
|
+
)
|
|
588
|
+
return _response.data
|