gitcode-api 1.3.1__py3-none-any.whl → 1.3.3__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.
- gitcode_api/cli.py +2 -2
- gitcode_api/resources/account/orgs_resource_group.py +178 -18
- gitcode_api/resources/account/users_resource_group.py +65 -9
- gitcode_api/resources/collaboration/issues_resource_group.py +334 -26
- gitcode_api/resources/collaboration/milestones_resource_group.py +64 -6
- gitcode_api/resources/collaboration/pulls_resource_group.py +296 -36
- gitcode_api/resources/misc/releases_resource_group.py +8 -5
- gitcode_api/resources/misc/webhooks_resource_group.py +144 -17
- gitcode_api/resources/repositories/repos_resource_group.py +452 -73
- gitcode_api/version.txt +1 -1
- {gitcode_api-1.3.1.dist-info → gitcode_api-1.3.3.dist-info}/METADATA +11 -11
- {gitcode_api-1.3.1.dist-info → gitcode_api-1.3.3.dist-info}/RECORD +16 -16
- {gitcode_api-1.3.1.dist-info → gitcode_api-1.3.3.dist-info}/WHEEL +0 -0
- {gitcode_api-1.3.1.dist-info → gitcode_api-1.3.3.dist-info}/entry_points.txt +0 -0
- {gitcode_api-1.3.1.dist-info → gitcode_api-1.3.3.dist-info}/licenses/LICENSE +0 -0
- {gitcode_api-1.3.1.dist-info → gitcode_api-1.3.3.dist-info}/top_level.txt +0 -0
|
@@ -302,22 +302,26 @@ class AbstractReposResource(ABC):
|
|
|
302
302
|
"""
|
|
303
303
|
|
|
304
304
|
@abstractmethod
|
|
305
|
-
def set_org_repo_status(self, *, org: str, repo: str, **
|
|
305
|
+
def set_org_repo_status(self, *, org: str, repo: str, status: int, password: str, **kwargs) -> ApiStatusResponse:
|
|
306
306
|
"""Update organization repository status metadata.
|
|
307
307
|
|
|
308
308
|
:param org: Organization path.
|
|
309
309
|
:param repo: Repository path.
|
|
310
|
-
:param
|
|
310
|
+
:param status: State, 0: open, 2: archived.
|
|
311
|
+
:param password: User password for verification.
|
|
312
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
311
313
|
:returns: API response payload.
|
|
312
314
|
"""
|
|
313
315
|
|
|
314
316
|
@abstractmethod
|
|
315
|
-
def transfer_to_org(self, *, org: str, repo: str, **
|
|
317
|
+
def transfer_to_org(self, *, org: str, repo: str, transfer_to: str, password: str, **kwargs) -> ApiStatusResponse:
|
|
316
318
|
"""Transfer a repository to an organization.
|
|
317
319
|
|
|
318
|
-
:param org:
|
|
320
|
+
:param org: Source organization path.
|
|
319
321
|
:param repo: Repository path.
|
|
320
|
-
:param
|
|
322
|
+
:param transfer_to: Target namespace.
|
|
323
|
+
:param password: User password for verification.
|
|
324
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
321
325
|
:returns: API response payload.
|
|
322
326
|
"""
|
|
323
327
|
|
|
@@ -332,26 +336,41 @@ class AbstractReposResource(ABC):
|
|
|
332
336
|
|
|
333
337
|
@abstractmethod
|
|
334
338
|
def update_transition(
|
|
335
|
-
self, *, owner: Optional[str] = None, repo: Optional[str] = None, **
|
|
339
|
+
self, *, owner: Optional[str] = None, repo: Optional[str] = None, mode: Optional[int] = None, **kwargs
|
|
336
340
|
) -> ApiStatusResponse:
|
|
337
341
|
"""Update repository transition settings.
|
|
338
342
|
|
|
339
343
|
:param owner: Repository owner path. Uses the client default when omitted.
|
|
340
344
|
:param repo: Repository name. Uses the client default when omitted.
|
|
341
|
-
:param
|
|
345
|
+
:param mode: Permission management mode: 1 (inheritance) or 2 (independent).
|
|
346
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
342
347
|
:returns: API response payload.
|
|
343
348
|
"""
|
|
344
349
|
|
|
345
350
|
@abstractmethod
|
|
346
351
|
def update_push_config(
|
|
347
|
-
self,
|
|
352
|
+
self,
|
|
353
|
+
*,
|
|
354
|
+
owner: Optional[str] = None,
|
|
355
|
+
repo: Optional[str] = None,
|
|
356
|
+
reject_not_signed_by_gpg: Optional[bool] = None,
|
|
357
|
+
commit_message_regex: Optional[str] = None,
|
|
358
|
+
max_file_size: Optional[int] = None,
|
|
359
|
+
skip_rule_for_owner: Optional[bool] = None,
|
|
360
|
+
deny_force_push: Optional[bool] = None,
|
|
361
|
+
**kwargs,
|
|
348
362
|
) -> RepositoryPushConfig:
|
|
349
363
|
"""Update repository push configuration.
|
|
350
364
|
|
|
351
365
|
:param owner: Repository owner path. Uses the client default when omitted.
|
|
352
366
|
:param repo: Repository name. Uses the client default when omitted.
|
|
353
|
-
:param
|
|
354
|
-
:
|
|
367
|
+
:param reject_not_signed_by_gpg: Only allow commits with verified GPG signatures.
|
|
368
|
+
:param commit_message_regex: Commit message validation regex.
|
|
369
|
+
:param max_file_size: Commit file size limit in MB.
|
|
370
|
+
:param skip_rule_for_owner: Whether project administrators skip push rules.
|
|
371
|
+
:param deny_force_push: Prohibit force push (including for administrators).
|
|
372
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
373
|
+
:returns: Updated push configuration.
|
|
355
374
|
"""
|
|
356
375
|
|
|
357
376
|
@abstractmethod
|
|
@@ -365,38 +384,78 @@ class AbstractReposResource(ABC):
|
|
|
365
384
|
|
|
366
385
|
@abstractmethod
|
|
367
386
|
def upload_image(
|
|
368
|
-
self,
|
|
387
|
+
self,
|
|
388
|
+
*,
|
|
389
|
+
owner: Optional[str] = None,
|
|
390
|
+
repo: Optional[str] = None,
|
|
391
|
+
body: Optional[str] = None,
|
|
392
|
+
file_name: Optional[str] = None,
|
|
393
|
+
**kwargs,
|
|
369
394
|
) -> RepositoryUploadResult:
|
|
370
395
|
"""Upload an image asset for a repository.
|
|
371
396
|
|
|
372
397
|
:param owner: Repository owner path. Uses the client default when omitted.
|
|
373
398
|
:param repo: Repository name. Uses the client default when omitted.
|
|
374
|
-
:param
|
|
399
|
+
:param body: File content in base64 format (limit: 20 MB).
|
|
400
|
+
:param file_name: File name.
|
|
401
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
375
402
|
:returns: Uploaded image metadata.
|
|
376
403
|
"""
|
|
377
404
|
|
|
378
405
|
@abstractmethod
|
|
379
406
|
def upload_file(
|
|
380
|
-
self,
|
|
407
|
+
self,
|
|
408
|
+
*,
|
|
409
|
+
owner: Optional[str] = None,
|
|
410
|
+
repo: Optional[str] = None,
|
|
411
|
+
file: Optional[str] = None,
|
|
412
|
+
**kwargs,
|
|
381
413
|
) -> RepositoryUploadResult:
|
|
382
414
|
"""Upload a file asset for a repository.
|
|
383
415
|
|
|
384
416
|
:param owner: Repository owner path. Uses the client default when omitted.
|
|
385
417
|
:param repo: Repository name. Uses the client default when omitted.
|
|
386
|
-
:param
|
|
418
|
+
:param file: File content in base64 format (limit: 20 MB).
|
|
419
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
387
420
|
:returns: Uploaded file metadata.
|
|
388
421
|
"""
|
|
389
422
|
|
|
390
423
|
@abstractmethod
|
|
391
424
|
def update_repo_settings(
|
|
392
|
-
self,
|
|
425
|
+
self,
|
|
426
|
+
*,
|
|
427
|
+
owner: Optional[str] = None,
|
|
428
|
+
repo: Optional[str] = None,
|
|
429
|
+
disable_fork: Optional[bool] = None,
|
|
430
|
+
forbidden_developer_create_branch: Optional[bool] = None,
|
|
431
|
+
forbidden_developer_create_tag: Optional[bool] = None,
|
|
432
|
+
forbidden_committer_create_branch: Optional[bool] = None,
|
|
433
|
+
forbidden_developer_create_branch_user_ids: Optional[str] = None,
|
|
434
|
+
branch_name_regex: Optional[str] = None,
|
|
435
|
+
tag_name_regex: Optional[str] = None,
|
|
436
|
+
generate_pre_merge_ref: Optional[bool] = None,
|
|
437
|
+
rebase_disable_trigger_webhook: Optional[bool] = None,
|
|
438
|
+
open_gpg_verified: Optional[bool] = None,
|
|
439
|
+
include_lfs_objects: Optional[bool] = None,
|
|
440
|
+
**kwargs,
|
|
393
441
|
) -> RepositorySettings:
|
|
394
442
|
"""Update repository settings.
|
|
395
443
|
|
|
396
444
|
:param owner: Repository owner path. Uses the client default when omitted.
|
|
397
445
|
:param repo: Repository name. Uses the client default when omitted.
|
|
398
|
-
:param
|
|
399
|
-
:
|
|
446
|
+
:param disable_fork: Disable forking.
|
|
447
|
+
:param forbidden_developer_create_branch: Forbid developers from creating branches.
|
|
448
|
+
:param forbidden_developer_create_tag: Forbid developers from creating tags.
|
|
449
|
+
:param forbidden_committer_create_branch: Forbid committers from creating branches.
|
|
450
|
+
:param forbidden_developer_create_branch_user_ids: User IDs forbidden from creating branches.
|
|
451
|
+
:param branch_name_regex: Branch name validation regex.
|
|
452
|
+
:param tag_name_regex: Tag name validation regex.
|
|
453
|
+
:param generate_pre_merge_ref: Generate pre-merge ref.
|
|
454
|
+
:param rebase_disable_trigger_webhook: Disable webhook trigger on rebase.
|
|
455
|
+
:param open_gpg_verified: Enable GPG verification.
|
|
456
|
+
:param include_lfs_objects: Include LFS objects in ZIP download.
|
|
457
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
458
|
+
:returns: Updated repository settings.
|
|
400
459
|
"""
|
|
401
460
|
|
|
402
461
|
@abstractmethod
|
|
@@ -421,14 +480,64 @@ class AbstractReposResource(ABC):
|
|
|
421
480
|
|
|
422
481
|
@abstractmethod
|
|
423
482
|
def update_pull_request_settings(
|
|
424
|
-
self,
|
|
483
|
+
self,
|
|
484
|
+
*,
|
|
485
|
+
owner: Optional[str] = None,
|
|
486
|
+
repo: Optional[str] = None,
|
|
487
|
+
approval_required_reviewers_enable: Optional[bool] = None,
|
|
488
|
+
approval_required_reviewers: Optional[int] = None,
|
|
489
|
+
only_allow_merge_if_all_discussions_are_resolved: Optional[bool] = None,
|
|
490
|
+
only_allow_merge_if_pipeline_succeeds: Optional[bool] = None,
|
|
491
|
+
disable_merge_by_self: Optional[bool] = None,
|
|
492
|
+
can_force_merge: Optional[bool] = None,
|
|
493
|
+
add_notes_after_merged: Optional[bool] = None,
|
|
494
|
+
mark_auto_merged_mr_as_closed: Optional[bool] = None,
|
|
495
|
+
can_reopen: Optional[bool] = None,
|
|
496
|
+
delete_source_branch_when_merged: Optional[bool] = None,
|
|
497
|
+
disable_squash_merge: Optional[bool] = None,
|
|
498
|
+
auto_squash_merge: Optional[bool] = None,
|
|
499
|
+
merge_method: Optional[str] = None,
|
|
500
|
+
squash_merge_with_no_merge_commit: Optional[bool] = None,
|
|
501
|
+
merged_commit_author: Optional[str] = None,
|
|
502
|
+
approval_required_approvers: Optional[int] = None,
|
|
503
|
+
approval_approver_ids: Optional[str] = None,
|
|
504
|
+
approval_tester_ids: Optional[str] = None,
|
|
505
|
+
approval_required_testers: Optional[int] = None,
|
|
506
|
+
is_check_cla: Optional[bool] = None,
|
|
507
|
+
is_allow_lite_merge_request: Optional[bool] = None,
|
|
508
|
+
lite_merge_request_prefix_title: Optional[str] = None,
|
|
509
|
+
close_issue_when_mr_merged: Optional[bool] = None,
|
|
510
|
+
**kwargs,
|
|
425
511
|
) -> PullRequestSettings:
|
|
426
512
|
"""Update pull request settings for a repository.
|
|
427
513
|
|
|
428
514
|
:param owner: Repository owner path. Uses the client default when omitted.
|
|
429
515
|
:param repo: Repository name. Uses the client default when omitted.
|
|
430
|
-
:param
|
|
431
|
-
:
|
|
516
|
+
:param approval_required_reviewers_enable: Enable required reviewers approval.
|
|
517
|
+
:param approval_required_reviewers: Minimum number of required reviewers (1-5, or 0 to disable).
|
|
518
|
+
:param only_allow_merge_if_all_discussions_are_resolved: Require all discussions resolved before merge.
|
|
519
|
+
:param only_allow_merge_if_pipeline_succeeds: Only allow merge when pipeline succeeds.
|
|
520
|
+
:param disable_merge_by_self: Forbid merging self-created pull requests.
|
|
521
|
+
:param can_force_merge: Allow administrators to force merge.
|
|
522
|
+
:param add_notes_after_merged: Allow code review comments after merge.
|
|
523
|
+
:param mark_auto_merged_mr_as_closed: Mark auto-merged MRs as closed.
|
|
524
|
+
:param can_reopen: Allow reopening closed pull requests.
|
|
525
|
+
:param delete_source_branch_when_merged: Delete source branch when merged.
|
|
526
|
+
:param disable_squash_merge: Disable squash merge.
|
|
527
|
+
:param auto_squash_merge: Default enable squash merge for new pull requests.
|
|
528
|
+
:param merge_method: Merge method (``merge``, ``rebase_merge``, or ``ff``).
|
|
529
|
+
:param squash_merge_with_no_merge_commit: Squash merge without producing a merge commit.
|
|
530
|
+
:param merged_commit_author: Merge commit author (``merged_by`` or ``created_by``).
|
|
531
|
+
:param approval_required_approvers: Number of required approvers.
|
|
532
|
+
:param approval_approver_ids: Project reviewer user IDs, comma-separated.
|
|
533
|
+
:param approval_tester_ids: Project tester user IDs, comma-separated.
|
|
534
|
+
:param approval_required_testers: Minimum number of testers that must pass.
|
|
535
|
+
:param is_check_cla: Whether to verify CLA.
|
|
536
|
+
:param is_allow_lite_merge_request: Enable lightweight pull requests.
|
|
537
|
+
:param lite_merge_request_prefix_title: Title prefix for lightweight pull requests.
|
|
538
|
+
:param close_issue_when_mr_merged: Default check "close linked issues on merge".
|
|
539
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
540
|
+
:returns: Updated pull request settings.
|
|
432
541
|
"""
|
|
433
542
|
|
|
434
543
|
@abstractmethod
|
|
@@ -450,15 +559,14 @@ class AbstractReposResource(ABC):
|
|
|
450
559
|
"""
|
|
451
560
|
|
|
452
561
|
@abstractmethod
|
|
453
|
-
def transfer(
|
|
454
|
-
self, *, owner: Optional[str] = None, repo: Optional[str] = None, **payload
|
|
455
|
-
) -> RepositoryTransferResult:
|
|
562
|
+
def transfer(self, *, owner: str, repo: str, new_owner: str, **kwargs) -> RepositoryTransferResult:
|
|
456
563
|
"""Transfer a repository to another owner or namespace.
|
|
457
564
|
|
|
458
|
-
:param owner: Repository owner path.
|
|
459
|
-
:param repo: Repository name.
|
|
460
|
-
:param
|
|
461
|
-
:
|
|
565
|
+
:param owner: Repository owner path.
|
|
566
|
+
:param repo: Repository name.
|
|
567
|
+
:param new_owner: Target namespace to transfer the repository to.
|
|
568
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
569
|
+
:returns: Transfer result.
|
|
462
570
|
"""
|
|
463
571
|
|
|
464
572
|
@abstractmethod
|
|
@@ -474,13 +582,23 @@ class AbstractReposResource(ABC):
|
|
|
474
582
|
|
|
475
583
|
@abstractmethod
|
|
476
584
|
def get_download_statistics(
|
|
477
|
-
self,
|
|
585
|
+
self,
|
|
586
|
+
*,
|
|
587
|
+
owner: Optional[str] = None,
|
|
588
|
+
repo: Optional[str] = None,
|
|
589
|
+
start_date: Optional[str] = None,
|
|
590
|
+
end_date: Optional[str] = None,
|
|
591
|
+
direction: Optional[str] = None,
|
|
592
|
+
**kwargs,
|
|
478
593
|
) -> RepositoryDownloadStatistics:
|
|
479
594
|
"""Get download statistics for a repository.
|
|
480
595
|
|
|
481
596
|
:param owner: Repository owner path. Uses the client default when omitted.
|
|
482
597
|
:param repo: Repository name. Uses the client default when omitted.
|
|
483
|
-
:param
|
|
598
|
+
:param start_date: Start date filter (e.g. ``2024-01-06``).
|
|
599
|
+
:param end_date: End date filter (e.g. ``2024-12-06``).
|
|
600
|
+
:param direction: Sort direction: ``asc`` or ``desc``. Default: ``desc``.
|
|
601
|
+
:param kwargs: Additional arguments forwarded directly in request.
|
|
484
602
|
:returns: Download statistics payload.
|
|
485
603
|
"""
|
|
486
604
|
|
|
@@ -748,14 +866,20 @@ class ReposResource(SyncResource, AbstractReposResource):
|
|
|
748
866
|
json=settings,
|
|
749
867
|
)
|
|
750
868
|
|
|
751
|
-
def set_org_repo_status(self, *, org: str, repo: str, **
|
|
869
|
+
def set_org_repo_status(self, *, org: str, repo: str, status: int, password: str, **kwargs) -> ApiStatusResponse:
|
|
752
870
|
return self._model(
|
|
753
|
-
"PUT",
|
|
871
|
+
"PUT",
|
|
872
|
+
self._client._path("org", org, "repo", repo, "status"),
|
|
873
|
+
ApiStatusResponse,
|
|
874
|
+
json={"status": status, "password": password, **kwargs},
|
|
754
875
|
)
|
|
755
876
|
|
|
756
|
-
def transfer_to_org(self, *, org: str, repo: str, **
|
|
877
|
+
def transfer_to_org(self, *, org: str, repo: str, transfer_to: str, password: str, **kwargs) -> ApiStatusResponse:
|
|
757
878
|
return self._model(
|
|
758
|
-
"POST",
|
|
879
|
+
"POST",
|
|
880
|
+
self._client._path("org", org, "projects", repo, "transfer"),
|
|
881
|
+
ApiStatusResponse,
|
|
882
|
+
json={"transfer_to": transfer_to, "password": password, **kwargs},
|
|
759
883
|
)
|
|
760
884
|
|
|
761
885
|
def get_transition(self, *, owner: Optional[str] = None, repo: Optional[str] = None) -> RepositoryPermissionMode:
|
|
@@ -764,47 +888,111 @@ class ReposResource(SyncResource, AbstractReposResource):
|
|
|
764
888
|
)
|
|
765
889
|
|
|
766
890
|
def update_transition(
|
|
767
|
-
self, *, owner: Optional[str] = None, repo: Optional[str] = None, **
|
|
891
|
+
self, *, owner: Optional[str] = None, repo: Optional[str] = None, mode: Optional[int] = None, **kwargs
|
|
768
892
|
) -> ApiStatusResponse:
|
|
769
893
|
return self._model(
|
|
770
|
-
"PUT",
|
|
894
|
+
"PUT",
|
|
895
|
+
self._client._repo_path("transition", owner=owner, repo=repo),
|
|
896
|
+
ApiStatusResponse,
|
|
897
|
+
json={"mode": mode, **kwargs},
|
|
771
898
|
)
|
|
772
899
|
|
|
773
900
|
def update_push_config(
|
|
774
|
-
self,
|
|
901
|
+
self,
|
|
902
|
+
*,
|
|
903
|
+
owner: Optional[str] = None,
|
|
904
|
+
repo: Optional[str] = None,
|
|
905
|
+
reject_not_signed_by_gpg: Optional[bool] = None,
|
|
906
|
+
commit_message_regex: Optional[str] = None,
|
|
907
|
+
max_file_size: Optional[int] = None,
|
|
908
|
+
skip_rule_for_owner: Optional[bool] = None,
|
|
909
|
+
deny_force_push: Optional[bool] = None,
|
|
910
|
+
**kwargs,
|
|
775
911
|
) -> RepositoryPushConfig:
|
|
776
912
|
return self._model(
|
|
777
|
-
"PUT",
|
|
913
|
+
"PUT",
|
|
914
|
+
self._client._repo_path("push_config", owner=owner, repo=repo),
|
|
915
|
+
RepositoryPushConfig,
|
|
916
|
+
json={
|
|
917
|
+
"reject_not_signed_by_gpg": reject_not_signed_by_gpg,
|
|
918
|
+
"commit_message_regex": commit_message_regex,
|
|
919
|
+
"max_file_size": max_file_size,
|
|
920
|
+
"skip_rule_for_owner": skip_rule_for_owner,
|
|
921
|
+
"deny_force_push": deny_force_push,
|
|
922
|
+
**kwargs,
|
|
923
|
+
},
|
|
778
924
|
)
|
|
779
925
|
|
|
780
926
|
def get_push_config(self, *, owner: Optional[str] = None, repo: Optional[str] = None) -> RepositoryPushConfig:
|
|
781
927
|
return self._model("GET", self._client._repo_path("push_config", owner=owner, repo=repo), RepositoryPushConfig)
|
|
782
928
|
|
|
783
929
|
def upload_image(
|
|
784
|
-
self,
|
|
930
|
+
self,
|
|
931
|
+
*,
|
|
932
|
+
owner: Optional[str] = None,
|
|
933
|
+
repo: Optional[str] = None,
|
|
934
|
+
body: Optional[str] = None,
|
|
935
|
+
file_name: Optional[str] = None,
|
|
936
|
+
**kwargs,
|
|
785
937
|
) -> RepositoryUploadResult:
|
|
786
938
|
return self._model(
|
|
787
939
|
"POST",
|
|
788
940
|
self._client._repo_path("img", "upload", owner=owner, repo=repo),
|
|
789
941
|
RepositoryUploadResult,
|
|
790
|
-
json=
|
|
942
|
+
json={"body": body, "file_name": file_name, **kwargs},
|
|
791
943
|
)
|
|
792
944
|
|
|
793
945
|
def upload_file(
|
|
794
|
-
self,
|
|
946
|
+
self,
|
|
947
|
+
*,
|
|
948
|
+
owner: Optional[str] = None,
|
|
949
|
+
repo: Optional[str] = None,
|
|
950
|
+
file: Optional[str] = None,
|
|
951
|
+
**kwargs,
|
|
795
952
|
) -> RepositoryUploadResult:
|
|
796
953
|
return self._model(
|
|
797
954
|
"POST",
|
|
798
955
|
self._client._repo_path("file", "upload", owner=owner, repo=repo),
|
|
799
956
|
RepositoryUploadResult,
|
|
800
|
-
json=
|
|
957
|
+
json={"file": file, **kwargs},
|
|
801
958
|
)
|
|
802
959
|
|
|
803
960
|
def update_repo_settings(
|
|
804
|
-
self,
|
|
961
|
+
self,
|
|
962
|
+
*,
|
|
963
|
+
owner: Optional[str] = None,
|
|
964
|
+
repo: Optional[str] = None,
|
|
965
|
+
disable_fork: Optional[bool] = None,
|
|
966
|
+
forbidden_developer_create_branch: Optional[bool] = None,
|
|
967
|
+
forbidden_developer_create_tag: Optional[bool] = None,
|
|
968
|
+
forbidden_committer_create_branch: Optional[bool] = None,
|
|
969
|
+
forbidden_developer_create_branch_user_ids: Optional[str] = None,
|
|
970
|
+
branch_name_regex: Optional[str] = None,
|
|
971
|
+
tag_name_regex: Optional[str] = None,
|
|
972
|
+
generate_pre_merge_ref: Optional[bool] = None,
|
|
973
|
+
rebase_disable_trigger_webhook: Optional[bool] = None,
|
|
974
|
+
open_gpg_verified: Optional[bool] = None,
|
|
975
|
+
include_lfs_objects: Optional[bool] = None,
|
|
976
|
+
**kwargs,
|
|
805
977
|
) -> RepositorySettings:
|
|
806
978
|
return self._model(
|
|
807
|
-
"PUT",
|
|
979
|
+
"PUT",
|
|
980
|
+
self._client._repo_path("repo_settings", owner=owner, repo=repo),
|
|
981
|
+
RepositorySettings,
|
|
982
|
+
json={
|
|
983
|
+
"disable_fork": disable_fork,
|
|
984
|
+
"forbidden_developer_create_branch": forbidden_developer_create_branch,
|
|
985
|
+
"forbidden_developer_create_tag": forbidden_developer_create_tag,
|
|
986
|
+
"forbidden_committer_create_branch": forbidden_committer_create_branch,
|
|
987
|
+
"forbidden_developer_create_branch_user_ids": forbidden_developer_create_branch_user_ids,
|
|
988
|
+
"branch_name_regex": branch_name_regex,
|
|
989
|
+
"tag_name_regex": tag_name_regex,
|
|
990
|
+
"generate_pre_merge_ref": generate_pre_merge_ref,
|
|
991
|
+
"rebase_disable_trigger_webhook": rebase_disable_trigger_webhook,
|
|
992
|
+
"open_gpg_verified": open_gpg_verified,
|
|
993
|
+
"include_lfs_objects": include_lfs_objects,
|
|
994
|
+
**kwargs,
|
|
995
|
+
},
|
|
808
996
|
)
|
|
809
997
|
|
|
810
998
|
def get_repo_settings(self, *, owner: Optional[str] = None, repo: Optional[str] = None) -> RepositorySettings:
|
|
@@ -818,13 +1006,65 @@ class ReposResource(SyncResource, AbstractReposResource):
|
|
|
818
1006
|
)
|
|
819
1007
|
|
|
820
1008
|
def update_pull_request_settings(
|
|
821
|
-
self,
|
|
1009
|
+
self,
|
|
1010
|
+
*,
|
|
1011
|
+
owner: Optional[str] = None,
|
|
1012
|
+
repo: Optional[str] = None,
|
|
1013
|
+
approval_required_reviewers_enable: Optional[bool] = None,
|
|
1014
|
+
approval_required_reviewers: Optional[int] = None,
|
|
1015
|
+
only_allow_merge_if_all_discussions_are_resolved: Optional[bool] = None,
|
|
1016
|
+
only_allow_merge_if_pipeline_succeeds: Optional[bool] = None,
|
|
1017
|
+
disable_merge_by_self: Optional[bool] = None,
|
|
1018
|
+
can_force_merge: Optional[bool] = None,
|
|
1019
|
+
add_notes_after_merged: Optional[bool] = None,
|
|
1020
|
+
mark_auto_merged_mr_as_closed: Optional[bool] = None,
|
|
1021
|
+
can_reopen: Optional[bool] = None,
|
|
1022
|
+
delete_source_branch_when_merged: Optional[bool] = None,
|
|
1023
|
+
disable_squash_merge: Optional[bool] = None,
|
|
1024
|
+
auto_squash_merge: Optional[bool] = None,
|
|
1025
|
+
merge_method: Optional[str] = None,
|
|
1026
|
+
squash_merge_with_no_merge_commit: Optional[bool] = None,
|
|
1027
|
+
merged_commit_author: Optional[str] = None,
|
|
1028
|
+
approval_required_approvers: Optional[int] = None,
|
|
1029
|
+
approval_approver_ids: Optional[str] = None,
|
|
1030
|
+
approval_tester_ids: Optional[str] = None,
|
|
1031
|
+
approval_required_testers: Optional[int] = None,
|
|
1032
|
+
is_check_cla: Optional[bool] = None,
|
|
1033
|
+
is_allow_lite_merge_request: Optional[bool] = None,
|
|
1034
|
+
lite_merge_request_prefix_title: Optional[str] = None,
|
|
1035
|
+
close_issue_when_mr_merged: Optional[bool] = None,
|
|
1036
|
+
**kwargs,
|
|
822
1037
|
) -> PullRequestSettings:
|
|
823
1038
|
return self._model(
|
|
824
1039
|
"PUT",
|
|
825
1040
|
self._client._repo_path("pull_request_settings", owner=owner, repo=repo),
|
|
826
1041
|
PullRequestSettings,
|
|
827
|
-
json=
|
|
1042
|
+
json={
|
|
1043
|
+
"approval_required_reviewers_enable": approval_required_reviewers_enable,
|
|
1044
|
+
"approval_required_reviewers": approval_required_reviewers,
|
|
1045
|
+
"only_allow_merge_if_all_discussions_are_resolved": only_allow_merge_if_all_discussions_are_resolved,
|
|
1046
|
+
"only_allow_merge_if_pipeline_succeeds": only_allow_merge_if_pipeline_succeeds,
|
|
1047
|
+
"disable_merge_by_self": disable_merge_by_self,
|
|
1048
|
+
"can_force_merge": can_force_merge,
|
|
1049
|
+
"add_notes_after_merged": add_notes_after_merged,
|
|
1050
|
+
"mark_auto_merged_mr_as_closed": mark_auto_merged_mr_as_closed,
|
|
1051
|
+
"can_reopen": can_reopen,
|
|
1052
|
+
"delete_source_branch_when_merged": delete_source_branch_when_merged,
|
|
1053
|
+
"disable_squash_merge": disable_squash_merge,
|
|
1054
|
+
"auto_squash_merge": auto_squash_merge,
|
|
1055
|
+
"merge_method": merge_method,
|
|
1056
|
+
"squash_merge_with_no_merge_commit": squash_merge_with_no_merge_commit,
|
|
1057
|
+
"merged_commit_author": merged_commit_author,
|
|
1058
|
+
"approval_required_approvers": approval_required_approvers,
|
|
1059
|
+
"approval_approver_ids": approval_approver_ids,
|
|
1060
|
+
"approval_tester_ids": approval_tester_ids,
|
|
1061
|
+
"approval_required_testers": approval_required_testers,
|
|
1062
|
+
"is_check_cla": is_check_cla,
|
|
1063
|
+
"is_allow_lite_merge_request": is_allow_lite_merge_request,
|
|
1064
|
+
"lite_merge_request_prefix_title": lite_merge_request_prefix_title,
|
|
1065
|
+
"close_issue_when_mr_merged": close_issue_when_mr_merged,
|
|
1066
|
+
**kwargs,
|
|
1067
|
+
},
|
|
828
1068
|
)
|
|
829
1069
|
|
|
830
1070
|
def set_member_role(
|
|
@@ -842,11 +1082,12 @@ class ReposResource(SyncResource, AbstractReposResource):
|
|
|
842
1082
|
json={"permission": permission},
|
|
843
1083
|
)
|
|
844
1084
|
|
|
845
|
-
def transfer(
|
|
846
|
-
self, *, owner: Optional[str] = None, repo: Optional[str] = None, **payload
|
|
847
|
-
) -> RepositoryTransferResult:
|
|
1085
|
+
def transfer(self, *, owner: str, repo: str, new_owner: str, **kwargs) -> RepositoryTransferResult:
|
|
848
1086
|
return self._model(
|
|
849
|
-
"POST",
|
|
1087
|
+
"POST",
|
|
1088
|
+
self._client._repo_path("transfer", owner=owner, repo=repo),
|
|
1089
|
+
RepositoryTransferResult,
|
|
1090
|
+
json={"new_owner": new_owner, **kwargs},
|
|
850
1091
|
)
|
|
851
1092
|
|
|
852
1093
|
def list_customized_roles(
|
|
@@ -856,13 +1097,20 @@ class ReposResource(SyncResource, AbstractReposResource):
|
|
|
856
1097
|
return [as_model(item, RepositoryCustomizedRole) for item in data]
|
|
857
1098
|
|
|
858
1099
|
def get_download_statistics(
|
|
859
|
-
self,
|
|
1100
|
+
self,
|
|
1101
|
+
*,
|
|
1102
|
+
owner: Optional[str] = None,
|
|
1103
|
+
repo: Optional[str] = None,
|
|
1104
|
+
start_date: Optional[str] = None,
|
|
1105
|
+
end_date: Optional[str] = None,
|
|
1106
|
+
direction: Optional[str] = None,
|
|
1107
|
+
**kwargs,
|
|
860
1108
|
) -> RepositoryDownloadStatistics:
|
|
861
1109
|
return self._model(
|
|
862
1110
|
"GET",
|
|
863
1111
|
self._client._repo_path("download_statistics", owner=owner, repo=repo),
|
|
864
1112
|
RepositoryDownloadStatistics,
|
|
865
|
-
params=
|
|
1113
|
+
params={"start_date": start_date, "end_date": end_date, "direction": direction, **kwargs},
|
|
866
1114
|
)
|
|
867
1115
|
|
|
868
1116
|
def get_contributor_statistics(
|
|
@@ -1128,14 +1376,24 @@ class AsyncReposResource(AsyncResource, AbstractReposResource):
|
|
|
1128
1376
|
json=settings,
|
|
1129
1377
|
)
|
|
1130
1378
|
|
|
1131
|
-
async def set_org_repo_status(
|
|
1379
|
+
async def set_org_repo_status(
|
|
1380
|
+
self, *, org: str, repo: str, status: int, password: str, **kwargs
|
|
1381
|
+
) -> ApiStatusResponse:
|
|
1132
1382
|
return await self._model(
|
|
1133
|
-
"PUT",
|
|
1383
|
+
"PUT",
|
|
1384
|
+
self._client._path("org", org, "repo", repo, "status"),
|
|
1385
|
+
ApiStatusResponse,
|
|
1386
|
+
json={"status": status, "password": password, **kwargs},
|
|
1134
1387
|
)
|
|
1135
1388
|
|
|
1136
|
-
async def transfer_to_org(
|
|
1389
|
+
async def transfer_to_org(
|
|
1390
|
+
self, *, org: str, repo: str, transfer_to: str, password: str, **kwargs
|
|
1391
|
+
) -> ApiStatusResponse:
|
|
1137
1392
|
return await self._model(
|
|
1138
|
-
"POST",
|
|
1393
|
+
"POST",
|
|
1394
|
+
self._client._path("org", org, "projects", repo, "transfer"),
|
|
1395
|
+
ApiStatusResponse,
|
|
1396
|
+
json={"transfer_to": transfer_to, "password": password, **kwargs},
|
|
1139
1397
|
)
|
|
1140
1398
|
|
|
1141
1399
|
async def get_transition(
|
|
@@ -1146,20 +1404,39 @@ class AsyncReposResource(AsyncResource, AbstractReposResource):
|
|
|
1146
1404
|
)
|
|
1147
1405
|
|
|
1148
1406
|
async def update_transition(
|
|
1149
|
-
self, *, owner: Optional[str] = None, repo: Optional[str] = None, **
|
|
1407
|
+
self, *, owner: Optional[str] = None, repo: Optional[str] = None, mode: Optional[int] = None, **kwargs
|
|
1150
1408
|
) -> ApiStatusResponse:
|
|
1151
1409
|
return await self._model(
|
|
1152
|
-
"PUT",
|
|
1410
|
+
"PUT",
|
|
1411
|
+
self._client._repo_path("transition", owner=owner, repo=repo),
|
|
1412
|
+
ApiStatusResponse,
|
|
1413
|
+
json={"mode": mode, **kwargs},
|
|
1153
1414
|
)
|
|
1154
1415
|
|
|
1155
1416
|
async def update_push_config(
|
|
1156
|
-
self,
|
|
1417
|
+
self,
|
|
1418
|
+
*,
|
|
1419
|
+
owner: Optional[str] = None,
|
|
1420
|
+
repo: Optional[str] = None,
|
|
1421
|
+
reject_not_signed_by_gpg: Optional[bool] = None,
|
|
1422
|
+
commit_message_regex: Optional[str] = None,
|
|
1423
|
+
max_file_size: Optional[int] = None,
|
|
1424
|
+
skip_rule_for_owner: Optional[bool] = None,
|
|
1425
|
+
deny_force_push: Optional[bool] = None,
|
|
1426
|
+
**kwargs,
|
|
1157
1427
|
) -> RepositoryPushConfig:
|
|
1158
1428
|
return await self._model(
|
|
1159
1429
|
"PUT",
|
|
1160
1430
|
self._client._repo_path("push_config", owner=owner, repo=repo),
|
|
1161
1431
|
RepositoryPushConfig,
|
|
1162
|
-
json=
|
|
1432
|
+
json={
|
|
1433
|
+
"reject_not_signed_by_gpg": reject_not_signed_by_gpg,
|
|
1434
|
+
"commit_message_regex": commit_message_regex,
|
|
1435
|
+
"max_file_size": max_file_size,
|
|
1436
|
+
"skip_rule_for_owner": skip_rule_for_owner,
|
|
1437
|
+
"deny_force_push": deny_force_push,
|
|
1438
|
+
**kwargs,
|
|
1439
|
+
},
|
|
1163
1440
|
)
|
|
1164
1441
|
|
|
1165
1442
|
async def get_push_config(self, *, owner: Optional[str] = None, repo: Optional[str] = None) -> RepositoryPushConfig:
|
|
@@ -1168,30 +1445,72 @@ class AsyncReposResource(AsyncResource, AbstractReposResource):
|
|
|
1168
1445
|
)
|
|
1169
1446
|
|
|
1170
1447
|
async def upload_image(
|
|
1171
|
-
self,
|
|
1448
|
+
self,
|
|
1449
|
+
*,
|
|
1450
|
+
owner: Optional[str] = None,
|
|
1451
|
+
repo: Optional[str] = None,
|
|
1452
|
+
body: Optional[str] = None,
|
|
1453
|
+
file_name: Optional[str] = None,
|
|
1454
|
+
**kwargs,
|
|
1172
1455
|
) -> RepositoryUploadResult:
|
|
1173
1456
|
return await self._model(
|
|
1174
1457
|
"POST",
|
|
1175
1458
|
self._client._repo_path("img", "upload", owner=owner, repo=repo),
|
|
1176
1459
|
RepositoryUploadResult,
|
|
1177
|
-
json=
|
|
1460
|
+
json={"body": body, "file_name": file_name, **kwargs},
|
|
1178
1461
|
)
|
|
1179
1462
|
|
|
1180
1463
|
async def upload_file(
|
|
1181
|
-
self,
|
|
1464
|
+
self,
|
|
1465
|
+
*,
|
|
1466
|
+
owner: Optional[str] = None,
|
|
1467
|
+
repo: Optional[str] = None,
|
|
1468
|
+
file: Optional[str] = None,
|
|
1469
|
+
**kwargs,
|
|
1182
1470
|
) -> RepositoryUploadResult:
|
|
1183
1471
|
return await self._model(
|
|
1184
1472
|
"POST",
|
|
1185
1473
|
self._client._repo_path("file", "upload", owner=owner, repo=repo),
|
|
1186
1474
|
RepositoryUploadResult,
|
|
1187
|
-
json=
|
|
1475
|
+
json={"file": file, **kwargs},
|
|
1188
1476
|
)
|
|
1189
1477
|
|
|
1190
1478
|
async def update_repo_settings(
|
|
1191
|
-
self,
|
|
1479
|
+
self,
|
|
1480
|
+
*,
|
|
1481
|
+
owner: Optional[str] = None,
|
|
1482
|
+
repo: Optional[str] = None,
|
|
1483
|
+
disable_fork: Optional[bool] = None,
|
|
1484
|
+
forbidden_developer_create_branch: Optional[bool] = None,
|
|
1485
|
+
forbidden_developer_create_tag: Optional[bool] = None,
|
|
1486
|
+
forbidden_committer_create_branch: Optional[bool] = None,
|
|
1487
|
+
forbidden_developer_create_branch_user_ids: Optional[str] = None,
|
|
1488
|
+
branch_name_regex: Optional[str] = None,
|
|
1489
|
+
tag_name_regex: Optional[str] = None,
|
|
1490
|
+
generate_pre_merge_ref: Optional[bool] = None,
|
|
1491
|
+
rebase_disable_trigger_webhook: Optional[bool] = None,
|
|
1492
|
+
open_gpg_verified: Optional[bool] = None,
|
|
1493
|
+
include_lfs_objects: Optional[bool] = None,
|
|
1494
|
+
**kwargs,
|
|
1192
1495
|
) -> RepositorySettings:
|
|
1193
1496
|
return await self._model(
|
|
1194
|
-
"PUT",
|
|
1497
|
+
"PUT",
|
|
1498
|
+
self._client._repo_path("repo_settings", owner=owner, repo=repo),
|
|
1499
|
+
RepositorySettings,
|
|
1500
|
+
json={
|
|
1501
|
+
"disable_fork": disable_fork,
|
|
1502
|
+
"forbidden_developer_create_branch": forbidden_developer_create_branch,
|
|
1503
|
+
"forbidden_developer_create_tag": forbidden_developer_create_tag,
|
|
1504
|
+
"forbidden_committer_create_branch": forbidden_committer_create_branch,
|
|
1505
|
+
"forbidden_developer_create_branch_user_ids": forbidden_developer_create_branch_user_ids,
|
|
1506
|
+
"branch_name_regex": branch_name_regex,
|
|
1507
|
+
"tag_name_regex": tag_name_regex,
|
|
1508
|
+
"generate_pre_merge_ref": generate_pre_merge_ref,
|
|
1509
|
+
"rebase_disable_trigger_webhook": rebase_disable_trigger_webhook,
|
|
1510
|
+
"open_gpg_verified": open_gpg_verified,
|
|
1511
|
+
"include_lfs_objects": include_lfs_objects,
|
|
1512
|
+
**kwargs,
|
|
1513
|
+
},
|
|
1195
1514
|
)
|
|
1196
1515
|
|
|
1197
1516
|
async def get_repo_settings(self, *, owner: Optional[str] = None, repo: Optional[str] = None) -> RepositorySettings:
|
|
@@ -1207,13 +1526,65 @@ class AsyncReposResource(AsyncResource, AbstractReposResource):
|
|
|
1207
1526
|
)
|
|
1208
1527
|
|
|
1209
1528
|
async def update_pull_request_settings(
|
|
1210
|
-
self,
|
|
1529
|
+
self,
|
|
1530
|
+
*,
|
|
1531
|
+
owner: Optional[str] = None,
|
|
1532
|
+
repo: Optional[str] = None,
|
|
1533
|
+
approval_required_reviewers_enable: Optional[bool] = None,
|
|
1534
|
+
approval_required_reviewers: Optional[int] = None,
|
|
1535
|
+
only_allow_merge_if_all_discussions_are_resolved: Optional[bool] = None,
|
|
1536
|
+
only_allow_merge_if_pipeline_succeeds: Optional[bool] = None,
|
|
1537
|
+
disable_merge_by_self: Optional[bool] = None,
|
|
1538
|
+
can_force_merge: Optional[bool] = None,
|
|
1539
|
+
add_notes_after_merged: Optional[bool] = None,
|
|
1540
|
+
mark_auto_merged_mr_as_closed: Optional[bool] = None,
|
|
1541
|
+
can_reopen: Optional[bool] = None,
|
|
1542
|
+
delete_source_branch_when_merged: Optional[bool] = None,
|
|
1543
|
+
disable_squash_merge: Optional[bool] = None,
|
|
1544
|
+
auto_squash_merge: Optional[bool] = None,
|
|
1545
|
+
merge_method: Optional[str] = None,
|
|
1546
|
+
squash_merge_with_no_merge_commit: Optional[bool] = None,
|
|
1547
|
+
merged_commit_author: Optional[str] = None,
|
|
1548
|
+
approval_required_approvers: Optional[int] = None,
|
|
1549
|
+
approval_approver_ids: Optional[str] = None,
|
|
1550
|
+
approval_tester_ids: Optional[str] = None,
|
|
1551
|
+
approval_required_testers: Optional[int] = None,
|
|
1552
|
+
is_check_cla: Optional[bool] = None,
|
|
1553
|
+
is_allow_lite_merge_request: Optional[bool] = None,
|
|
1554
|
+
lite_merge_request_prefix_title: Optional[str] = None,
|
|
1555
|
+
close_issue_when_mr_merged: Optional[bool] = None,
|
|
1556
|
+
**kwargs,
|
|
1211
1557
|
) -> PullRequestSettings:
|
|
1212
1558
|
return await self._model(
|
|
1213
1559
|
"PUT",
|
|
1214
1560
|
self._client._repo_path("pull_request_settings", owner=owner, repo=repo),
|
|
1215
1561
|
PullRequestSettings,
|
|
1216
|
-
json=
|
|
1562
|
+
json={
|
|
1563
|
+
"approval_required_reviewers_enable": approval_required_reviewers_enable,
|
|
1564
|
+
"approval_required_reviewers": approval_required_reviewers,
|
|
1565
|
+
"only_allow_merge_if_all_discussions_are_resolved": only_allow_merge_if_all_discussions_are_resolved,
|
|
1566
|
+
"only_allow_merge_if_pipeline_succeeds": only_allow_merge_if_pipeline_succeeds,
|
|
1567
|
+
"disable_merge_by_self": disable_merge_by_self,
|
|
1568
|
+
"can_force_merge": can_force_merge,
|
|
1569
|
+
"add_notes_after_merged": add_notes_after_merged,
|
|
1570
|
+
"mark_auto_merged_mr_as_closed": mark_auto_merged_mr_as_closed,
|
|
1571
|
+
"can_reopen": can_reopen,
|
|
1572
|
+
"delete_source_branch_when_merged": delete_source_branch_when_merged,
|
|
1573
|
+
"disable_squash_merge": disable_squash_merge,
|
|
1574
|
+
"auto_squash_merge": auto_squash_merge,
|
|
1575
|
+
"merge_method": merge_method,
|
|
1576
|
+
"squash_merge_with_no_merge_commit": squash_merge_with_no_merge_commit,
|
|
1577
|
+
"merged_commit_author": merged_commit_author,
|
|
1578
|
+
"approval_required_approvers": approval_required_approvers,
|
|
1579
|
+
"approval_approver_ids": approval_approver_ids,
|
|
1580
|
+
"approval_tester_ids": approval_tester_ids,
|
|
1581
|
+
"approval_required_testers": approval_required_testers,
|
|
1582
|
+
"is_check_cla": is_check_cla,
|
|
1583
|
+
"is_allow_lite_merge_request": is_allow_lite_merge_request,
|
|
1584
|
+
"lite_merge_request_prefix_title": lite_merge_request_prefix_title,
|
|
1585
|
+
"close_issue_when_mr_merged": close_issue_when_mr_merged,
|
|
1586
|
+
**kwargs,
|
|
1587
|
+
},
|
|
1217
1588
|
)
|
|
1218
1589
|
|
|
1219
1590
|
async def set_member_role(
|
|
@@ -1231,11 +1602,12 @@ class AsyncReposResource(AsyncResource, AbstractReposResource):
|
|
|
1231
1602
|
json={"permission": permission},
|
|
1232
1603
|
)
|
|
1233
1604
|
|
|
1234
|
-
async def transfer(
|
|
1235
|
-
self, *, owner: Optional[str] = None, repo: Optional[str] = None, **payload
|
|
1236
|
-
) -> RepositoryTransferResult:
|
|
1605
|
+
async def transfer(self, *, owner: str, repo: str, new_owner: str, **kwargs) -> RepositoryTransferResult:
|
|
1237
1606
|
return await self._model(
|
|
1238
|
-
"POST",
|
|
1607
|
+
"POST",
|
|
1608
|
+
self._client._repo_path("transfer", owner=owner, repo=repo),
|
|
1609
|
+
RepositoryTransferResult,
|
|
1610
|
+
json={"new_owner": new_owner, **kwargs},
|
|
1239
1611
|
)
|
|
1240
1612
|
|
|
1241
1613
|
async def list_customized_roles(
|
|
@@ -1245,13 +1617,20 @@ class AsyncReposResource(AsyncResource, AbstractReposResource):
|
|
|
1245
1617
|
return [as_model(item, RepositoryCustomizedRole) for item in data]
|
|
1246
1618
|
|
|
1247
1619
|
async def get_download_statistics(
|
|
1248
|
-
self,
|
|
1620
|
+
self,
|
|
1621
|
+
*,
|
|
1622
|
+
owner: Optional[str] = None,
|
|
1623
|
+
repo: Optional[str] = None,
|
|
1624
|
+
start_date: Optional[str] = None,
|
|
1625
|
+
end_date: Optional[str] = None,
|
|
1626
|
+
direction: Optional[str] = None,
|
|
1627
|
+
**kwargs,
|
|
1249
1628
|
) -> RepositoryDownloadStatistics:
|
|
1250
1629
|
return await self._model(
|
|
1251
1630
|
"GET",
|
|
1252
1631
|
self._client._repo_path("download_statistics", owner=owner, repo=repo),
|
|
1253
1632
|
RepositoryDownloadStatistics,
|
|
1254
|
-
params=
|
|
1633
|
+
params={"start_date": start_date, "end_date": end_date, "direction": direction, **kwargs},
|
|
1255
1634
|
)
|
|
1256
1635
|
|
|
1257
1636
|
async def get_contributor_statistics(
|