clear-skies-gitlab 2.0.4__py3-none-any.whl → 2.0.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/METADATA +1 -1
  2. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/RECORD +34 -34
  3. clearskies_gitlab/defaults/gitlab_default_auth.py +33 -2
  4. clearskies_gitlab/defaults/gitlab_default_host.py +31 -2
  5. clearskies_gitlab/rest/backends/gitlab_rest_backend.py +98 -80
  6. clearskies_gitlab/rest/gitlab_branch_rule.py +74 -1
  7. clearskies_gitlab/rest/gitlab_cicd_variable.py +78 -1
  8. clearskies_gitlab/rest/gitlab_member.py +80 -1
  9. clearskies_gitlab/rest/models/gitlab_rest_advanced_search.py +67 -1
  10. clearskies_gitlab/rest/models/gitlab_rest_advanced_search_blob.py +72 -1
  11. clearskies_gitlab/rest/models/gitlab_rest_current_user.py +134 -1
  12. clearskies_gitlab/rest/models/gitlab_rest_group.py +60 -1
  13. clearskies_gitlab/rest/models/gitlab_rest_group_access_token.py +102 -1
  14. clearskies_gitlab/rest/models/gitlab_rest_group_base.py +305 -1
  15. clearskies_gitlab/rest/models/gitlab_rest_group_member.py +64 -1
  16. clearskies_gitlab/rest/models/gitlab_rest_group_project.py +27 -1
  17. clearskies_gitlab/rest/models/gitlab_rest_group_search.py +30 -1
  18. clearskies_gitlab/rest/models/gitlab_rest_group_search_blob.py +27 -1
  19. clearskies_gitlab/rest/models/gitlab_rest_group_subgroup.py +54 -17
  20. clearskies_gitlab/rest/models/gitlab_rest_group_variable.py +44 -1
  21. clearskies_gitlab/rest/models/gitlab_rest_namespace.py +178 -1
  22. clearskies_gitlab/rest/models/gitlab_rest_project.py +501 -3
  23. clearskies_gitlab/rest/models/gitlab_rest_project_approval_config.py +90 -2
  24. clearskies_gitlab/rest/models/gitlab_rest_project_approval_rule.py +92 -1
  25. clearskies_gitlab/rest/models/gitlab_rest_project_member.py +62 -1
  26. clearskies_gitlab/rest/models/gitlab_rest_project_protected_branch.py +132 -1
  27. clearskies_gitlab/rest/models/gitlab_rest_project_repository_commit.py +144 -2
  28. clearskies_gitlab/rest/models/gitlab_rest_project_repository_commit_diff.py +89 -2
  29. clearskies_gitlab/rest/models/gitlab_rest_project_repository_contributor.py +68 -2
  30. clearskies_gitlab/rest/models/gitlab_rest_project_repository_file.py +90 -1
  31. clearskies_gitlab/rest/models/gitlab_rest_project_repository_file_raw.py +57 -3
  32. clearskies_gitlab/rest/models/gitlab_rest_project_variable.py +46 -1
  33. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/WHEEL +0 -0
  34. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/licenses/LICENSE +0 -0
@@ -28,7 +28,38 @@ from clearskies_gitlab.rest.models import (
28
28
 
29
29
 
30
30
  class GitlabRestProject(Model):
31
- """Model for projects."""
31
+ """
32
+ Model for GitLab projects.
33
+
34
+ This model provides access to the GitLab Projects API for managing projects
35
+ and their settings. Projects are the core organizational unit in GitLab,
36
+ containing repositories, issues, merge requests, and CI/CD pipelines.
37
+
38
+ See https://docs.gitlab.com/api/projects/ for more details.
39
+
40
+ Example usage:
41
+
42
+ ```python
43
+ from clearskies_gitlab.rest.models import GitlabRestProject
44
+
45
+
46
+ def my_function(projects: GitlabRestProject):
47
+ # List all projects
48
+ for project in projects:
49
+ print(f"Project: {project.name}")
50
+ print(f"URL: {project.web_url}")
51
+
52
+ # Find a specific project
53
+ my_project = projects.find("path_with_namespace=my-group/my-project")
54
+ if my_project:
55
+ print(f"Default branch: {my_project.default_branch}")
56
+ print(f"Stars: {my_project.star_count}")
57
+
58
+ # Access related resources
59
+ for branch in my_project.protected_branches:
60
+ print(f"Protected branch: {branch.name}")
61
+ ```
62
+ """
32
63
 
33
64
  id_column_name: str = "id"
34
65
 
@@ -43,133 +74,524 @@ class GitlabRestProject(Model):
43
74
  """Return the slug of the api endpoint for this model."""
44
75
  return "projects"
45
76
 
77
+ """
78
+ The unique identifier for the project.
79
+ """
46
80
  id = String()
47
81
 
82
+ """
83
+ A description of the project.
84
+ """
48
85
  description = String()
86
+
87
+ """
88
+ The project description rendered as HTML.
89
+ """
49
90
  description_html = String()
91
+
92
+ """
93
+ The visibility level of the project.
94
+
95
+ Values: "public", "internal", or "private".
96
+ """
50
97
  visibility = String()
98
+
99
+ """
100
+ The SSH URL for cloning the repository.
101
+ """
51
102
  ssh_url_to_repo = String()
103
+
104
+ """
105
+ The HTTP URL for cloning the repository.
106
+ """
52
107
  http_url_to_repo = String()
108
+
109
+ """
110
+ URL to the project's GitLab page.
111
+ """
53
112
  web_url = String()
113
+
114
+ """
115
+ Topics/tags associated with the project.
116
+ """
54
117
  topics = Json()
118
+
119
+ """
120
+ The display name of the project.
121
+ """
55
122
  name = String()
123
+
124
+ """
125
+ The URL-friendly path/slug of the project.
126
+ """
56
127
  path = String()
128
+
129
+ """
130
+ Whether the issues feature is enabled.
131
+ """
57
132
  issues_enabled = Boolean()
133
+
134
+ """
135
+ The number of open issues.
136
+ """
58
137
  open_issues_count = Integer()
138
+
139
+ """
140
+ Whether the merge requests feature is enabled.
141
+ """
59
142
  merge_requests_enabled = Boolean()
143
+
144
+ """
145
+ Whether CI/CD jobs are enabled.
146
+ """
60
147
  jobs_enabled = Boolean()
148
+
149
+ """
150
+ Whether the wiki feature is enabled.
151
+ """
61
152
  wiki_enabled = Boolean()
153
+
154
+ """
155
+ Whether the snippets feature is enabled.
156
+ """
62
157
  snippets_enabled = Boolean()
158
+
159
+ """
160
+ The date and time when the project was created.
161
+ """
63
162
  created_at = Datetime()
163
+
164
+ """
165
+ The date and time when the project was last updated.
166
+ """
64
167
  updated_at = Datetime()
168
+
169
+ """
170
+ The date and time of the last activity on the project.
171
+ """
65
172
  last_activity_at = Datetime()
173
+
174
+ """
175
+ The import status of the project.
176
+ """
66
177
  import_status = String()
178
+
179
+ """
180
+ Whether the project is archived.
181
+
182
+ Archived projects are read-only.
183
+ """
67
184
  archived = Boolean()
185
+
186
+ """
187
+ URL to the project's avatar image.
188
+ """
68
189
  avatar_url = String()
190
+
191
+ """
192
+ Whether shared runners are enabled for this project.
193
+ """
69
194
  shared_runners_enabled = Boolean()
195
+
196
+ """
197
+ The number of forks of this project.
198
+ """
70
199
  forks_count = Integer()
200
+
201
+ """
202
+ The number of stars this project has received.
203
+ """
71
204
  star_count = Integer()
72
205
 
206
+ """
207
+ The ID of the group this project belongs to.
208
+ """
73
209
  group_id = BelongsToId(gitlab_rest_group_reference.GitlabRestGroupReference)
210
+
211
+ """
212
+ The group model this project belongs to.
213
+ """
74
214
  group = BelongsToModel("group_id")
75
215
 
216
+ """
217
+ The ID of the namespace this project belongs to.
218
+ """
76
219
  namespace_id = BelongsToId(gitlab_rest_namespace.GitlabRestNamespace)
220
+
221
+ """
222
+ The namespace model this project belongs to.
223
+ """
77
224
  namespace = BelongsToModel("namespace_id")
78
225
 
226
+ """
227
+ Whether pipeline trigger can approve deployment.
228
+ """
79
229
  allow_pipeline_trigger_approve_deployment = Boolean()
80
230
 
81
- # REST-specific fields not available in GraphQL
231
+ """
232
+ The default branch for the repository.
233
+ """
82
234
  default_branch = String()
235
+
236
+ """
237
+ The user ID of the project creator.
238
+ """
83
239
  creator_id = Integer()
240
+
241
+ """
242
+ URL to the project's README file.
243
+ """
84
244
  readme_url = String()
245
+
246
+ """
247
+ Information about the project owner.
248
+ """
85
249
  owner = Json()
250
+
251
+ """
252
+ Whether to resolve outdated diff discussions automatically.
253
+ """
86
254
  resolve_outdated_diff_discussions = Boolean()
255
+
256
+ """
257
+ The URL used to import the project.
258
+ """
87
259
  import_url = String()
260
+
261
+ """
262
+ The type of import (e.g., "github", "gitlab").
263
+ """
88
264
  import_type = String()
265
+
266
+ """
267
+ Any error that occurred during import.
268
+ """
89
269
  import_error = String()
270
+
271
+ """
272
+ URL to the project's license file.
273
+ """
90
274
  license_url = String()
275
+
276
+ """
277
+ License information for the project.
278
+ """
91
279
  license = Json()
280
+
281
+ """
282
+ Whether group runners are enabled.
283
+ """
92
284
  group_runners_enabled = Boolean()
285
+
286
+ """
287
+ The container registry access level.
288
+ """
93
289
  container_registry_access_level = Select(allowed_values=["disabled", "private", "enabled"])
290
+
291
+ """
292
+ The container security and compliance access level.
293
+ """
94
294
  container_security_and_compliance_access_level = Select(allowed_values=["disabled", "private", "enabled"])
295
+
296
+ """
297
+ Container expiration policy settings.
298
+ """
95
299
  container_expiration_policy = Json()
300
+
301
+ """
302
+ The runners registration token for this project.
303
+ """
96
304
  runners_token = String()
305
+
306
+ """
307
+ Whether CI forward deployment is enabled.
308
+ """
97
309
  ci_forward_deployment_enabled = Boolean()
310
+
311
+ """
312
+ Whether CI forward deployment rollback is allowed.
313
+ """
98
314
  ci_forward_deployment_rollback_allowed = Boolean()
315
+
316
+ """
317
+ Whether CI caches are separated.
318
+ """
99
319
  ci_separated_caches = Boolean()
320
+
321
+ """
322
+ The role required to cancel pipelines.
323
+ """
100
324
  ci_restrict_pipeline_cancellation_role = Select(allowed_values=["maintainer", "developer", "no_one"])
325
+
326
+ """
327
+ The minimum role required to override pipeline variables.
328
+ """
101
329
  ci_pipeline_variables_minimum_override_role = Select(
102
330
  allowed_values=["owner", "developer", "maintainer", "no_one_allowed"]
103
331
  )
332
+
333
+ """
334
+ Whether push to repository for job token is allowed.
335
+ """
104
336
  ci_push_repository_for_job_token_allowed = Boolean()
337
+
338
+ """
339
+ Whether job logs are public.
340
+ """
105
341
  public_jobs = Boolean()
342
+
343
+ """
344
+ Groups that this project is shared with.
345
+ """
106
346
  shared_with_groups = Json()
347
+
348
+ """
349
+ The repository storage location.
350
+ """
107
351
  repository_storage = String()
352
+
353
+ """
354
+ Whether merge is only allowed if pipeline succeeds.
355
+ """
108
356
  only_allow_merge_if_pipeline_succeeds = Boolean()
357
+
358
+ """
359
+ Whether merge is allowed on skipped pipeline.
360
+ """
109
361
  allow_merge_on_skipped_pipeline = Boolean()
362
+
363
+ """
364
+ Whether user-defined variables are restricted.
365
+ """
110
366
  restrict_user_defined_variables = Boolean()
367
+
368
+ """
369
+ Whether merge is only allowed if all discussions are resolved.
370
+ """
111
371
  only_allow_merge_if_all_discussions_are_resolved = Boolean()
372
+
373
+ """
374
+ Whether to remove source branch after merge.
375
+ """
112
376
  remove_source_branch_after_merge = Boolean()
377
+
378
+ """
379
+ Whether to print merge request link after push.
380
+ """
113
381
  printing_merge_requests_link_enabled = Boolean()
382
+
383
+ """
384
+ Whether users can request access to the project.
385
+ """
114
386
  request_access_enabled = Boolean()
387
+
388
+ """
389
+ The merge method for the project.
390
+ """
115
391
  merge_method = Select(allowed_values=["merge", "rebase_merge", "ff"])
392
+
393
+ """
394
+ The squash option for merge requests.
395
+ """
116
396
  squash_option = Select(allowed_values=["never", "always", "default_on", "default_off"])
397
+
398
+ """
399
+ Whether this project is a mirror.
400
+ """
117
401
  mirror = Boolean()
402
+
403
+ """
404
+ The user ID of the mirror owner.
405
+ """
118
406
  mirror_user_id = Integer()
407
+
408
+ """
409
+ Whether mirror triggers builds.
410
+ """
119
411
  mirror_trigger_builds = Boolean()
412
+
413
+ """
414
+ Whether only protected branches are mirrored.
415
+ """
120
416
  only_mirror_protected_branches = Boolean()
417
+
418
+ """
419
+ Whether mirror overwrites diverged branches.
420
+ """
121
421
  mirror_overwrites_diverged_branches = Boolean()
422
+
423
+ """
424
+ External authorization classification label.
425
+ """
122
426
  external_authorization_classification_label = String()
427
+
428
+ """
429
+ Whether packages are enabled.
430
+ """
123
431
  packages_enabled = Boolean()
432
+
433
+ """
434
+ Whether service desk is enabled.
435
+ """
124
436
  service_desk_enabled = Boolean()
437
+
438
+ """
439
+ The service desk email address.
440
+ """
125
441
  service_desk_address = String()
442
+
443
+ """
444
+ Whether to auto-close referenced issues.
445
+ """
126
446
  autoclose_referenced_issues = Boolean()
447
+
448
+ """
449
+ The suggestion commit message template.
450
+ """
127
451
  suggestion_commit_message = String()
452
+
453
+ """
454
+ Whether to enforce auth checks on uploads.
455
+ """
128
456
  enforce_auth_checks_on_uploads = Boolean()
457
+
458
+ """
459
+ The merge commit message template.
460
+ """
129
461
  merge_commit_template = String()
462
+
463
+ """
464
+ The squash commit message template.
465
+ """
130
466
  squash_commit_template = String()
467
+
468
+ """
469
+ The issue branch template.
470
+ """
131
471
  issue_branch_template = String()
472
+
473
+ """
474
+ Compliance frameworks applied to this project.
475
+ """
132
476
  compliance_frameworks = Json()
477
+
478
+ """
479
+ Project statistics (storage, commits, etc.).
480
+ """
133
481
  statistics = Json()
482
+
483
+ """
484
+ The container registry image prefix.
485
+ """
134
486
  container_registry_image_prefix = String()
135
487
 
488
+ """
489
+ Whether the user can create merge requests in this project.
490
+ """
136
491
  can_create_merge_request_in = Boolean()
492
+
493
+ """
494
+ Whether Auto DevOps is enabled.
495
+ """
137
496
  auto_devops_enabled = Boolean()
497
+
498
+ """
499
+ The Auto DevOps deployment strategy.
500
+ """
138
501
  auto_devops_deploy_strategy = Select(allowed_values=["continuous", "manual", "timed_incremental"])
502
+
503
+ """
504
+ Whether fork pipelines can run in parent project.
505
+ """
139
506
  ci_allow_fork_pipelines_to_run_in_parent_project = Boolean()
507
+
508
+ """
509
+ The default Git depth for CI.
510
+ """
140
511
  ci_default_git_depth = Integer()
512
+
513
+ """
514
+ The full name including namespace.
515
+ """
141
516
  name_with_namespace = String()
517
+
518
+ """
519
+ The full path including namespace.
520
+ """
142
521
  path_with_namespace = String()
522
+
523
+ """
524
+ User permissions for this project.
525
+ """
143
526
  permissions = Json()
144
527
 
528
+ """
529
+ CI/CD variables for this project.
530
+ """
145
531
  variables = HasMany(
146
532
  gitlab_rest_project_variable_reference.GitlabRestProjectVariableReference,
147
533
  foreign_column_name="project_id",
148
534
  )
149
535
 
536
+ """
537
+ Protected branches for this project.
538
+ """
150
539
  protected_branches = HasMany(
151
540
  gitlab_rest_project_protected_branch_reference.GitlabRestProjectProtectedBranchReference,
152
541
  foreign_column_name="project_id",
153
542
  )
154
543
 
544
+ """
545
+ Approval configuration for this project.
546
+ """
155
547
  approval_config = HasOne(
156
548
  gitlab_rest_project_approval_config_reference.GitlabRestProjectApprovalConfigReference,
157
549
  foreign_column_name="project_id",
158
550
  )
159
551
 
552
+ """
553
+ Approval rules for this project.
554
+ """
160
555
  approval_rules = HasMany(
161
556
  gitlab_rest_project_approval_rule_reference.GitlabRestProjectApprovalRuleReference,
162
557
  foreign_column_name="project_id",
163
558
  )
164
559
 
165
- # contributors = HasMany(
166
560
  ### Search params
561
+
562
+ """
563
+ Whether to include hidden projects.
564
+ """
167
565
  include_hidden = Boolean()
566
+
567
+ """
568
+ Whether to include projects pending deletion.
569
+ """
168
570
  include_pending_delete = Boolean()
571
+
572
+ """
573
+ Filter by last activity after this date.
574
+ """
169
575
  last_activity_after = Datetime()
576
+
577
+ """
578
+ Filter by last activity before this date.
579
+ """
170
580
  last_activity_before = Datetime()
581
+
582
+ """
583
+ Whether to only return projects the user is a member of.
584
+ """
171
585
  membership = Boolean()
586
+
587
+ """
588
+ Minimum access level required.
589
+ """
172
590
  min_access_level = Integer()
591
+
592
+ """
593
+ Field to order results by.
594
+ """
173
595
  order_by = Select(
174
596
  allowed_values=[
175
597
  "id",
@@ -182,22 +604,98 @@ class GitlabRestProject(Model):
182
604
  "similarity",
183
605
  ]
184
606
  )
607
+
608
+ """
609
+ Whether to only return projects owned by the current user.
610
+ """
185
611
  owned = Boolean()
612
+
613
+ """
614
+ Whether to filter by repository checksum failure.
615
+ """
186
616
  repository_checksum_failed = Boolean()
617
+
618
+ """
619
+ Filter by repository storage location.
620
+ """
187
621
  repository_storage = String()
622
+
623
+ """
624
+ Whether to search in namespaces.
625
+ """
188
626
  search_namespaces = Boolean()
627
+
628
+ """
629
+ Search query to filter projects.
630
+ """
189
631
  search = String()
632
+
633
+ """
634
+ Whether to return simplified project information.
635
+ """
190
636
  simple = Boolean()
637
+
638
+ """
639
+ Sort direction (asc or desc).
640
+ """
191
641
  sort = String()
642
+
643
+ """
644
+ Whether to only return starred projects.
645
+ """
192
646
  starred = Boolean()
647
+
648
+ """
649
+ Filter by topic ID.
650
+ """
193
651
  topic_id = Integer()
652
+
653
+ """
654
+ Filter by topic name.
655
+ """
194
656
  topic = String()
657
+
658
+ """
659
+ Filter by updated after this date.
660
+ """
195
661
  updated_after = Datetime()
662
+
663
+ """
664
+ Filter by updated before this date.
665
+ """
196
666
  updated_before = Datetime()
667
+
668
+ """
669
+ Filter by visibility level.
670
+ """
197
671
  visibility = Select(allowed_values=["public", "internal", "private"])
672
+
673
+ """
674
+ Whether to filter by wiki checksum failure.
675
+ """
198
676
  wiki_checksum_failed = Boolean()
677
+
678
+ """
679
+ Whether to include custom attributes in the response.
680
+ """
199
681
  with_custom_attributes = Boolean()
682
+
683
+ """
684
+ Whether to only return projects with issues enabled.
685
+ """
200
686
  with_issues_enabled = Boolean()
687
+
688
+ """
689
+ Whether to only return projects with merge requests enabled.
690
+ """
201
691
  with_merge_requests_enabled = Boolean()
692
+
693
+ """
694
+ Filter by programming language.
695
+ """
202
696
  with_programming_language = String()
697
+
698
+ """
699
+ Filter by deletion date.
700
+ """
203
701
  marked_for_deletion_on = Datetime(date_format="%Y-%m-%d")