gitlabform 6.3.3__tar.gz → 6.3.5__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.
Files changed (275) hide show
  1. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/_releases.yml +33 -1
  2. {gitlabform-6.3.3 → gitlabform-6.3.5}/Dockerfile +5 -0
  3. {gitlabform-6.3.3 → gitlabform-6.3.5}/PKG-INFO +4 -5
  4. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/main.py +12 -0
  5. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/release.py +79 -1
  6. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/changelog.md +30 -0
  7. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/contrib/implementation_design.md +11 -28
  8. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/contrib/releases.md +2 -4
  9. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/__init__.py +5 -4
  10. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/gitlab/__init__.py +5 -8
  11. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/gitlab/core.py +0 -7
  12. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/gitlab/python_gitlab.py +64 -1
  13. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/lists/groups.py +28 -21
  14. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/lists/projects.py +58 -35
  15. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_ldap_links_processor.py +7 -1
  16. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_members_processor.py +8 -4
  17. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/members_processor.py +40 -8
  18. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/protected_environments_processor.py +4 -0
  19. {gitlabform-6.3.3 → gitlabform-6.3.5}/pyproject.toml +13 -14
  20. {gitlabform-6.3.3 → gitlabform-6.3.5}/tbump.toml +2 -2
  21. gitlabform-6.3.5/tests/unit/dev/test_release.py +153 -0
  22. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/gitlab/test_python_gitlab.py +113 -1
  23. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_group_ldap_links_processor.py +24 -0
  24. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_group_members_processor.py +16 -0
  25. gitlabform-6.3.5/tests/unit/processors/test_members_processor.py +115 -0
  26. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_protected_environments_processor.py +11 -0
  27. gitlabform-6.3.5/tests/unit/test_groups_provider.py +55 -0
  28. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/test_projects_provider.py +101 -50
  29. gitlabform-6.3.5/tests/unit/test_show_version.py +18 -0
  30. {gitlabform-6.3.3 → gitlabform-6.3.5}/uv.lock +232 -254
  31. gitlabform-6.3.3/gitlabform/gitlab/groups.py +0 -89
  32. gitlabform-6.3.3/gitlabform/gitlab/projects.py +0 -58
  33. gitlabform-6.3.3/tests/unit/gitlab/test_groups.py +0 -15
  34. {gitlabform-6.3.3 → gitlabform-6.3.5}/.coveragerc +0 -0
  35. {gitlabform-6.3.3 → gitlabform-6.3.5}/.dockerignore +0 -0
  36. {gitlabform-6.3.3 → gitlabform-6.3.5}/.git-blame-ignore-revs +0 -0
  37. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/CODEOWNERS +0 -0
  38. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  39. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  40. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/ISSUE_TEMPLATE/question-or-other-issue.md +0 -0
  41. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/actions/setup-uv-local/README.md +0 -0
  42. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/actions/setup-uv-local/action.yml +0 -0
  43. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/dependabot.yml +0 -0
  44. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/_main.yml +0 -0
  45. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/build.yml +0 -0
  46. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/codecov-upload.yml +0 -0
  47. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/pr-ci-workflow.yml +0 -0
  48. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/prs-entrypoint-forks.yml +0 -0
  49. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/prs-entrypoint-main.yml +0 -0
  50. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/static-analysis.yml +0 -0
  51. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/tests-acceptance.yml +0 -0
  52. {gitlabform-6.3.3 → gitlabform-6.3.5}/.github/workflows/tests-unit.yml +0 -0
  53. {gitlabform-6.3.3 → gitlabform-6.3.5}/.gitignore +0 -0
  54. {gitlabform-6.3.3 → gitlabform-6.3.5}/.lgtm.yml +0 -0
  55. {gitlabform-6.3.3 → gitlabform-6.3.5}/.mypy.ini +0 -0
  56. {gitlabform-6.3.3 → gitlabform-6.3.5}/.overrides/gitlabform-logo-favicon.png +0 -0
  57. {gitlabform-6.3.3 → gitlabform-6.3.5}/.overrides/gitlabform-logo-favicon.svg +0 -0
  58. {gitlabform-6.3.3 → gitlabform-6.3.5}/.python-version +0 -0
  59. {gitlabform-6.3.3 → gitlabform-6.3.5}/CONTRIBUTING.md +0 -0
  60. {gitlabform-6.3.3 → gitlabform-6.3.5}/LICENSE +0 -0
  61. {gitlabform-6.3.3 → gitlabform-6.3.5}/README.md +0 -0
  62. {gitlabform-6.3.3 → gitlabform-6.3.5}/codecov.yml +0 -0
  63. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/__init__.py +0 -0
  64. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/common.py +0 -0
  65. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/docker.py +0 -0
  66. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/docs.py +0 -0
  67. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/env.py +0 -0
  68. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/gitlab/await-healthy.sh +0 -0
  69. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/gitlab/gitlab.rb +0 -0
  70. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/gitlab/healthcheck-and-setup.sh +0 -0
  71. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/gitlab/run_gitlab_in_docker.sh +0 -0
  72. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/gitlab/tests.Dockerfile +0 -0
  73. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/infra.py +0 -0
  74. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/package.py +0 -0
  75. {gitlabform-6.3.3 → gitlabform-6.3.5}/dev/qa.py +0 -0
  76. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/automation.md +0 -0
  77. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/contrib/coding_guidelines.md +0 -0
  78. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/contrib/index.md +0 -0
  79. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/contrib/local_development.md +0 -0
  80. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/contrib/workflows.md +0 -0
  81. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/features.md +0 -0
  82. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/Opencast-logo.png +0 -0
  83. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/egnyte-logo.svg +0 -0
  84. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/elastic-path-logo.svg +0 -0
  85. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/gitlabform-logo-square.png +0 -0
  86. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/gitlabform-logo.png +0 -0
  87. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/gitlabform-logo.svg +0 -0
  88. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/group-ldap-links-provider.png +0 -0
  89. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/liquidlight-logo.svg +0 -0
  90. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/roche-logo.png +0 -0
  91. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/stroeer-online-marketing-logo.svg +0 -0
  92. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/images/ti8m-logo.png +0 -0
  93. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/index.md +0 -0
  94. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/installation.md +0 -0
  95. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/archive_unarchive.md +0 -0
  96. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/avatar.md +0 -0
  97. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/badges.md +0 -0
  98. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/ci_cd_variables.md +0 -0
  99. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/deploy_keys.md +0 -0
  100. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/files.md +0 -0
  101. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/group_ldap_links.md +0 -0
  102. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/group_saml_links.md +0 -0
  103. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/index.md +0 -0
  104. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/integrations.md +0 -0
  105. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/job_token_scope.md +0 -0
  106. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/labels.md +0 -0
  107. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/members.md +0 -0
  108. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/merge_requests.md +0 -0
  109. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/pipeline_schedules.md +0 -0
  110. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/project_security_settings.md +0 -0
  111. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/project_transfer.md +0 -0
  112. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/protected_branches.md +0 -0
  113. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/protected_environments.md +0 -0
  114. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/push_mirrors.md +0 -0
  115. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/push_rules.md +0 -0
  116. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/resource_groups.md +0 -0
  117. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/settings.md +0 -0
  118. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/tags_protection.md +0 -0
  119. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/reference/webhooks.md +0 -0
  120. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/requirements.md +0 -0
  121. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/running.md +0 -0
  122. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/similar_apps.md +0 -0
  123. {gitlabform-6.3.3 → gitlabform-6.3.5}/docs/upgrade.md +0 -0
  124. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlab-config/config.yml +0 -0
  125. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlab-config/gitlab-config.md +0 -0
  126. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/configuration/__init__.py +0 -0
  127. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/configuration/common.py +0 -0
  128. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/configuration/core.py +0 -0
  129. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/configuration/groups.py +0 -0
  130. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/configuration/projects.py +0 -0
  131. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/configuration/transform.py +0 -0
  132. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/constants.py +0 -0
  133. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/lists/__init__.py +0 -0
  134. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/lists/filter.py +0 -0
  135. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/output.py +0 -0
  136. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/__init__.py +0 -0
  137. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/abstract_processor.py +0 -0
  138. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/application/__init__.py +0 -0
  139. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/application/application_settings_processor.py +0 -0
  140. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/__init__.py +0 -0
  141. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_badges_processor.py +0 -0
  142. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_hooks_processor.py +0 -0
  143. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_labels_processor.py +0 -0
  144. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_protected_branches_processor.py +0 -0
  145. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_push_rules_processor.py +0 -0
  146. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_saml_links_processor.py +0 -0
  147. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_settings_processor.py +0 -0
  148. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/group/group_variables_processor.py +0 -0
  149. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/__init__.py +0 -0
  150. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/badges_processor.py +0 -0
  151. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/branches_processor.py +0 -0
  152. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/deploy_keys_processor.py +0 -0
  153. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/files_processor.py +0 -0
  154. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/hooks_processor.py +0 -0
  155. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/integrations_processor.py +0 -0
  156. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/job_token_scope_processor.py +0 -0
  157. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/merge_requests_approval_rules.py +0 -0
  158. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/merge_requests_approvals.py +0 -0
  159. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/project_labels_processor.py +0 -0
  160. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/project_processor.py +0 -0
  161. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/project_push_rules_processor.py +0 -0
  162. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/project_security_settings.py +0 -0
  163. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/project_settings_processor.py +0 -0
  164. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/project_variables_processor.py +0 -0
  165. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/remote_mirrors_processor.py +0 -0
  166. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/resource_groups_processor.py +0 -0
  167. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/schedules_processor.py +0 -0
  168. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/project/tags_processor.py +0 -0
  169. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/util/__init__.py +0 -0
  170. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/util/badges_processor.py +0 -0
  171. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/util/branch_protection.py +0 -0
  172. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/util/decorators.py +0 -0
  173. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/util/difference_logger.py +0 -0
  174. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/util/labels_processor.py +0 -0
  175. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/processors/util/variables_processor.py +0 -0
  176. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/run.py +0 -0
  177. {gitlabform-6.3.3 → gitlabform-6.3.5}/gitlabform/util.py +0 -0
  178. {gitlabform-6.3.3 → gitlabform-6.3.5}/mkdocs.yml +0 -0
  179. {gitlabform-6.3.3 → gitlabform-6.3.5}/prek.toml +0 -0
  180. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/__init__.py +0 -0
  181. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/__init__.py +0 -0
  182. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/conftest.py +0 -0
  183. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_branches.py +0 -0
  184. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_branches_users_case_insensitive.py +0 -0
  185. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_group_ldap_links.py +0 -0
  186. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_group_protected_branches.py +0 -0
  187. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_group_push_rules.py +0 -0
  188. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_group_saml_links.py +0 -0
  189. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_group_settings.py +0 -0
  190. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_group_variables.py +0 -0
  191. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_merge_request_approval_rules.py +0 -0
  192. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_merge_request_approvals_settings.py +0 -0
  193. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_protected_environments.py +0 -0
  194. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_push_rules.py +0 -0
  195. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/premium/test_tags.py +0 -0
  196. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/__init__.py +0 -0
  197. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_application_settings.py +0 -0
  198. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_archive_project.py +0 -0
  199. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_badges.py +0 -0
  200. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_branches.py +0 -0
  201. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_deploy_keys.py +0 -0
  202. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_deploy_keys_all_projects.py +0 -0
  203. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_files.py +0 -0
  204. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_files_templates.py +0 -0
  205. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_avatar.py +0 -0
  206. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_badges.py +0 -0
  207. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_hooks.py +0 -0
  208. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_labels.py +0 -0
  209. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_members_case_insensitive.py +0 -0
  210. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_members_groups.py +0 -0
  211. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_members_users.py +0 -0
  212. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_settings.py +0 -0
  213. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_group_variables.py +0 -0
  214. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_hooks.py +0 -0
  215. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_integrations.py +0 -0
  216. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_job_token_scope.py +0 -0
  217. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_members.py +0 -0
  218. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_members_add_group.py +0 -0
  219. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_members_enforce.py +0 -0
  220. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_project_avatar.py +0 -0
  221. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_project_group_members_case_insensitive.py +0 -0
  222. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_project_labels.py +0 -0
  223. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_project_members_case_insensitve.py +0 -0
  224. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_project_settings.py +0 -0
  225. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_project_variables.py +0 -0
  226. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_remote_mirrors.py +0 -0
  227. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_resource_groups.py +0 -0
  228. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_running.py +0 -0
  229. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_scheduled_for_deletion_project.py +0 -0
  230. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_schedules.py +0 -0
  231. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_tags.py +0 -0
  232. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_token_from_config.py +0 -0
  233. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_transfer_project.py +0 -0
  234. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/standard/test_wildcard_patterns.py +0 -0
  235. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/ultimate/test_group_members.py +0 -0
  236. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/ultimate/test_group_settings.py +0 -0
  237. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/ultimate/test_members.py +0 -0
  238. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/ultimate/test_project_security_settings.py +0 -0
  239. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/acceptance/ultimate/test_project_settings.py +0 -0
  240. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/__init__.py +0 -0
  241. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/__init__.py +0 -0
  242. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_case_sensitivity.py +0 -0
  243. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_inheritance_break_projects_and_groups.py +0 -0
  244. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_inheritance_break_subgroups.py +0 -0
  245. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_inheritance_break_validation.py +0 -0
  246. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_projects_and_groups.py +0 -0
  247. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_skip_groups_skip_projects.py +0 -0
  248. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_subgroups.py +0 -0
  249. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_wildcard_patterns.py +0 -0
  250. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/test_yaml_version.py +0 -0
  251. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/transform/test_access_level_transformer.py +0 -0
  252. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/transform/test_convert_to_simple_types.py +0 -0
  253. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/transform/test_group_transformer.py +0 -0
  254. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/transform/test_implicit_name_transformer.py +0 -0
  255. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/transform/test_user_and_group_transformers.py +0 -0
  256. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/configuration/transform/test_user_transformer.py +0 -0
  257. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/gitlab/test_core.py +0 -0
  258. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/__init__.py +0 -0
  259. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_abstract_processor.py +0 -0
  260. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_abstract_processors.py +0 -0
  261. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_branches_processor.py +0 -0
  262. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_deploy_keys_processor.py +0 -0
  263. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_difference_logger.py +0 -0
  264. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_files_processor.py +0 -0
  265. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_group_protected_branches_processor.py +0 -0
  266. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_group_saml_links_processor.py +0 -0
  267. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_merge_requests_approval_rules_processor.py +0 -0
  268. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_schedules_processor_extended_cron_pattern.py +0 -0
  269. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/processors/test_util_badges_processor.py +0 -0
  270. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/test_access_levels.py +0 -0
  271. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/test_non_empty_configs_provider.py +0 -0
  272. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/test_output.py +0 -0
  273. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/test_parse_args.py +0 -0
  274. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/test_show_summary.py +0 -0
  275. {gitlabform-6.3.3 → gitlabform-6.3.5}/tests/unit/test_utils.py +0 -0
@@ -96,12 +96,44 @@ jobs:
96
96
  - prep-release
97
97
  runs-on: ubuntu-latest
98
98
  steps:
99
+ # The tooling comes from the workflow's own ref, so that tags older than
100
+ # the tooling can still be released. Only the changelog comes from the tag.
101
+ # No step in this job needs git credentials, so they are not left on disk
102
+ # for the dependency install below.
103
+ - name: Checkout repository
104
+ uses: actions/checkout@v7
105
+ with:
106
+ persist-credentials: false
107
+ - name: Checkout changelog of the release tag
108
+ uses: actions/checkout@v7
109
+ with:
110
+ ref: ${{ needs.prep-release.outputs.semver_tag }}
111
+ path: release-tag
112
+ persist-credentials: false
113
+ sparse-checkout: docs/changelog.md
114
+ sparse-checkout-cone-mode: false
115
+ - name: Configure uv environment
116
+ uses: ./.github/actions/setup-uv-local
117
+ with:
118
+ python-version: "3.14"
119
+ # Release notes are the `## <version>` changelog section, with relative
120
+ # docs links rewritten to the docs site.
121
+ - name: Extract release notes from changelog
122
+ id: notes
123
+ env:
124
+ TAG: ${{ needs.prep-release.outputs.semver_tag }}
125
+ run: >-
126
+ uv run --frozen --no-dev glf-dev release gh-release-notes
127
+ --tag "$TAG"
128
+ --changelog release-tag/docs/changelog.md
129
+ --output release-notes.md
99
130
  - name: Create release in GitHub
100
131
  uses: ncipollo/release-action@v1
101
132
  with:
102
133
  tag: ${{ needs.prep-release.outputs.semver_tag }}
103
134
  name: ${{ needs.prep-release.outputs.semver_tag }}
104
- body: "(this is a placeholder, it will be replaced with a changelog contents)"
135
+ bodyFile: release-notes.md
136
+ prerelease: ${{ steps.notes.outputs.prerelease }}
105
137
  token: ${{ secrets.GITHUB_TOKEN }}
106
138
 
107
139
  publish-to-pypi:
@@ -24,6 +24,11 @@ FROM python:3.15-alpine AS final
24
24
  # Create a non-root user for security
25
25
  RUN addgroup -S appgroup && adduser -S appuser -G appgroup
26
26
 
27
+ # Remove pip and its bundled wheel. The app runs from the copied venv and never installs packages.
28
+ RUN rm -rf /usr/local/lib/python3.*/site-packages/pip* \
29
+ /usr/local/lib/python3.*/ensurepip \
30
+ /usr/local/bin/pip*
31
+
27
32
  # Copy the virtual environment to the same location to preserve absolute paths in shebangs
28
33
  COPY --from=builder /app/.venv /app/.venv
29
34
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gitlabform
3
- Version: 6.3.3
3
+ Version: 6.3.5
4
4
  Summary: 🏗 Specialized configuration as a code tool for GitLab projects, groups and more using hierarchical configuration written in YAML
5
5
  Project-URL: Homepage, https://gitlabform.github.io/gitlabform/
6
6
  Project-URL: Repository, https://github.com/gitlabform/gitlabform.git
@@ -19,14 +19,13 @@ Classifier: Operating System :: POSIX :: Linux
19
19
  Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Topic :: Software Development :: Version Control :: Git
21
21
  Requires-Python: >=3.12.0
22
- Requires-Dist: certifi==2026.10.23
23
- Requires-Dist: cli-ui==0.19.0
22
+ Requires-Dist: certifi==2026.11.20
24
23
  Requires-Dist: jinja2==3.1.6
25
24
  Requires-Dist: luddite==1.0.4
26
25
  Requires-Dist: markupsafe==3.0.4
27
26
  Requires-Dist: mergedeep==1.3.4
28
- Requires-Dist: packaging==26.3
29
- Requires-Dist: python-gitlab[graphql]==8.6.0
27
+ Requires-Dist: packaging==26.4
28
+ Requires-Dist: python-gitlab[graphql]==9.0.0
30
29
  Requires-Dist: requests==2.34.2
31
30
  Requires-Dist: rich==15.0.0
32
31
  Requires-Dist: ruamel-yaml==0.19.1
@@ -36,6 +36,7 @@ from dev.release import (
36
36
  publish_pypi as run_publish_logic,
37
37
  publish_docker as run_docker_push_logic,
38
38
  gh_workflow_check as run_gh_workflow_check_logic,
39
+ gh_release_notes as run_gh_release_notes_logic,
39
40
  )
40
41
 
41
42
  # --- Constant Descriptions for Unification ---
@@ -163,6 +164,15 @@ def _add_release_subcommands(subparsers):
163
164
  description="Perform pre-flight validation for GitHub Actions. This command resolves version tags from git history and verifies the integrity of the triggering workflow run.",
164
165
  )
165
166
 
167
+ notes = subparsers.add_parser(
168
+ "gh-release-notes",
169
+ help="Extract the GitHub release notes from the changelog",
170
+ description="Extract the changelog section of the given tag, with relative docs links rewritten to the docs site, and report whether the version is a pre-release.",
171
+ )
172
+ notes.add_argument("--tag", required=True, help="Tag to release (e.g., v1.2.3)")
173
+ notes.add_argument("--output", help="File to write the notes to (default: print them)")
174
+ notes.add_argument("--changelog", type=Path, help="Changelog to read (default: docs/changelog.md of this checkout)")
175
+
166
176
  pypi = subparsers.add_parser(
167
177
  "pypi",
168
178
  help="Publish the Python package to PyPI",
@@ -184,6 +194,8 @@ def _dispatch_release(args):
184
194
  """Executes release logic."""
185
195
  if args.command == "gh-workflow-check":
186
196
  run_gh_workflow_check_logic(args.extra_args if hasattr(args, "extra_args") else None)
197
+ elif args.command == "gh-release-notes":
198
+ run_gh_release_notes_logic(args.tag, args.output, args.changelog)
187
199
  elif args.command == "pypi":
188
200
  run_publish_logic(args.extra_args)
189
201
  elif args.command == "docker":
@@ -4,9 +4,18 @@ import argparse
4
4
  import os
5
5
  import re
6
6
  import sys
7
+ from pathlib import Path
7
8
  from typing import NoReturn
8
9
  import requests
9
- from dev.common import logger, run_command, get_executable
10
+ from packaging.version import InvalidVersion, Version
11
+ from dev.common import REPO_ROOT, logger, run_command, get_executable
12
+
13
+ DOCS_SITE_URL = "https://gitlabform.github.io/gitlabform"
14
+
15
+ _ASCII_WHITESPACE = " \t\r\n\f\v"
16
+ _HEADING = re.compile(r"[ \t]*##([ \t]|$)")
17
+ _FENCE = re.compile(r"[ \t]*(`{3,}|~{3,})(.*)")
18
+ _RELATIVE_DOCS_LINK = re.compile(r"\]\(([A-Za-z0-9_/-]+)\.md\)")
10
19
 
11
20
 
12
21
  def _append_github_output(key: str, value: str):
@@ -249,6 +258,75 @@ def gh_workflow_check(extra_args: list[str] | None = None):
249
258
  _conclude_validation(False, f"Unsupported event: {event_name}", severity="error")
250
259
 
251
260
 
261
+ def extract_release_notes(changelog: str, version: str) -> str:
262
+ """
263
+ Returns the body of the `## <version>` changelog section.
264
+
265
+ The section ends at the next `## ` heading. Headings inside fenced code
266
+ blocks are ignored, and relative docs links are rewritten to the docs site.
267
+ """
268
+ lines: list[str] = []
269
+ fence = ""
270
+ in_section = False
271
+ # Only "\n" ends a line: splitlines() would also split on characters such
272
+ # as U+2028 that can end up inside a changelog entry.
273
+ for line in changelog.removesuffix("\n").split("\n"):
274
+ fence_match = _FENCE.match(line)
275
+ if fence_match:
276
+ marker, rest = fence_match.groups()
277
+ if not fence:
278
+ # A backtick fence cannot have backticks after it: that is inline code.
279
+ if marker[0] == "~" or "`" not in rest:
280
+ fence = marker
281
+ elif marker.startswith(fence) and not rest.strip(_ASCII_WHITESPACE):
282
+ fence = ""
283
+ elif not fence and _HEADING.match(line):
284
+ in_section = line.rstrip(_ASCII_WHITESPACE) == f"## {version}"
285
+ continue
286
+ if in_section:
287
+ lines.append(line)
288
+
289
+ notes = "".join(f"{line}\n" for line in lines)
290
+ return _RELATIVE_DOCS_LINK.sub(rf"]({DOCS_SITE_URL}/\1/)", notes)
291
+
292
+
293
+ def is_prerelease(version: str) -> bool:
294
+ """Returns True for PEP 440 pre-releases, and for versions that are not valid PEP 440."""
295
+ try:
296
+ return Version(version).is_prerelease
297
+ except InvalidVersion:
298
+ return True
299
+
300
+
301
+ def gh_release_notes(tag: str, output: str | None = None, changelog: Path | None = None):
302
+ """
303
+ Extracts the GitHub release notes for a tag and reports whether it is a pre-release.
304
+
305
+ The notes are written to `output`, or printed when no output is given.
306
+ `prerelease` is set as a step output for the step that creates the GitHub release.
307
+
308
+ LOCAL TESTING:
309
+ uv run glf-dev release gh-release-notes --tag v1.2.3
310
+ """
311
+ version = tag.removeprefix("v")
312
+ changelog = changelog or REPO_ROOT / "docs" / "changelog.md"
313
+
314
+ notes = extract_release_notes(changelog.read_text(encoding="utf-8"), version)
315
+ if not notes.strip():
316
+ print(f"::error title=Release Notes::no or empty '## {version}' section in {changelog.name}")
317
+ sys.exit(1)
318
+
319
+ prerelease = is_prerelease(version)
320
+ if output:
321
+ Path(output).write_text(notes, encoding="utf-8")
322
+ logger.info(
323
+ f"Release notes for [bold cyan]{version}[/bold cyan] written to {output} (prerelease: {prerelease})"
324
+ )
325
+ else:
326
+ print(notes, end="")
327
+ _append_github_output("prerelease", "true" if prerelease else "false")
328
+
329
+
252
330
  def publish_pypi(extra_args: list[str] | None = None):
253
331
  """Publishes the built Python artifacts to PyPI.
254
332
 
@@ -6,6 +6,36 @@ For details on how to migrate between major versions, please refer to the [upgra
6
6
 
7
7
  ---
8
8
 
9
+ ## 6.3.5
10
+
11
+ ### Refactors
12
+
13
+ * migrate lists and project members groups to python-gitlab [#1485](https://github.com/gitlabform/gitlabform/pull/1485). ([rickbrouwer](https://github.com/rickbrouwer))
14
+
15
+ ### Dependencies
16
+
17
+ * Update various dependencies to newer versions.
18
+
19
+ Thanks to all the contributors of this release!
20
+
21
+ ## 6.3.4
22
+
23
+ ### Bug Fixes
24
+
25
+ * consistent enforce, delete key and unshare handling across processors [#1512](https://github.com/gitlabform/gitlabform/pull/1512). ([rickbrouwer](https://github.com/rickbrouwer))
26
+ * show latest stable version in CLI notices [#1511](https://github.com/gitlabform/gitlabform/pull/1511). ([andrew-demb](https://github.com/andrew-demb))
27
+
28
+ ### Build
29
+
30
+ * remove pip from the final Docker image [#1508](https://github.com/gitlabform/gitlabform/pull/1508). ([rickbrouwer](https://github.com/rickbrouwer))
31
+ * remove unused cli-ui dependency [#1492](https://github.com/gitlabform/gitlabform/pull/1492). ([rickbrouwer](https://github.com/rickbrouwer))
32
+
33
+ ### Dependencies
34
+
35
+ * Update various dependencies to newer versions.
36
+
37
+ Thanks to all the contributors of this release!
38
+
9
39
  ## 6.3.3
10
40
 
11
41
  ### Dependencies
@@ -37,14 +37,6 @@ A python_gitlab instance `./gitlabform/gitlab/python_gitlab.py` is provided on `
37
37
 
38
38
  Please see the below doc sections for more info about these packages.
39
39
 
40
- ## Common pattern - multiple inheritance
41
-
42
- The legacy `gitlabform.gitlab` package uses _multiple inheritance_.
43
-
44
- The basic features are implemented in the "core" class defined in `core.py`. Extensions to it are defined in other
45
- files as "feature" classes that inherit the "core". Finally, there is an "everything" class that groups them all - it is
46
- defined in the `__init__.py` file.
47
-
48
40
  ### gitlabform.*, gitlabform.lists.* and gitlabform.processors.*
49
41
 
50
42
  The entry point for running the app is in `run.py` and the main logic is in the `GitLabForm` class.
@@ -86,29 +78,20 @@ to `ProjectProcessors` in `project > __init__.py`.
86
78
 
87
79
  ### gitlabform.gitlab.*
88
80
 
89
- !!! important
90
-
91
- We have decided to move away from our own homegrown GitLab API client to the `python-gitlab` library. (See [issue #73](https://github.com/gitlabform/gitlabform/issues/73) for info.) Therefore, you should **NOT** add any more code to this package!
81
+ This package contains two things:
92
82
 
93
- With the basics for making requests to the GitLab API covered in the `GitLabCore` class in `core.py`, all other code
94
- is simple (most of the time).
83
+ * `python_gitlab.py` - the `PythonGitlab` class that extends `python-gitlab`'s `Gitlab` class with
84
+ convenience methods and caching used throughout the app. This is the place to add shared helpers
85
+ for calling the GitLab API.
86
+ * `core.py` - the legacy `GitLabCore` class, which reads the app configuration, sets up the HTTP
87
+ session and checks the GitLab version and the connected user. A few configuration transformers
88
+ still use its helpers; the long-term plan is to move the rest of this to `python-gitlab` as well
89
+ (see [issue #73](https://github.com/gitlabform/gitlabform/issues/73)).
95
90
 
96
- Almost all methods in other classes end up calling `self._make_requests_to_api`, which takes care of making the HTTP
97
- GitLab API requests with proper authentication, pagination, retries, timeouts and more.
98
-
99
- Sometimes there is some logic in these methods if:
100
-
101
- * we only need a specific part of the response from GitLab API - see `GitLabGroups.get_groups()` as an example,
102
- * some GitLab APIs need some workarounds for their bugs or documentation inconsistencies, like:
103
- * some APIs declare in the docs that they accept both "group/project" string OR a project id while in fact only the latter works,
104
- * some APIs return invalid HTTP error codes, like 404 instead of 400 - see `GroupLDAPLinksProcessor._create_link` as an example.
105
-
106
- #### Usage
91
+ Do not add new REST client code to `core.py`: new code should use `python-gitlab`, through `PythonGitlab`.
107
92
 
108
- Do not add new code here: new code should use `python-gitlab` (see the processors for examples).
109
- The remaining "feature" classes in this package (`GitLabGroups` in `groups.py` and `GitLabProjects`
110
- in `projects.py`) only exist because `gitlabform.lists.*` and a few processors still use them,
111
- and they will be removed once those are migrated to `python-gitlab` too.
93
+ Sometimes some logic is needed around the API calls, for example because some GitLab APIs return
94
+ invalid HTTP error codes, like 404 instead of 400 - see `GroupLDAPLinksProcessor._create_link` as an example.
112
95
 
113
96
  ### gitlabform.configuration.*
114
97
 
@@ -7,7 +7,7 @@ We try to follow the [PEP 440](https://peps.python.org/pep-0440/) versioning sch
7
7
  ## Procedure
8
8
 
9
9
  1. Make sure you're on `main` branch and it is up-to-date.
10
- 2. Add an entry in [changelog.md](../changelog.md). Remember to give thanks to all the contributors! Commit this change.
10
+ 2. Add an entry in [changelog.md](../changelog.md) under a `## <new-semantic-version-number>` heading. Everything up to the next `## ` heading becomes the GitHub release notes. Remember to give thanks to all the contributors! Commit this change.
11
11
  3. Update version using [`tbump`](https://github.com/your-tools/tbump). Run `pipx run tbump <new-semantic-version-number>`.
12
12
 
13
13
  **Note**: You may need to install `pipx` first if it's not already installed. Follow the instructions at [`pipx` documentation](https://pypa.github.io/pipx/installation/).
@@ -18,8 +18,6 @@ We try to follow the [PEP 440](https://peps.python.org/pep-0440/) versioning sch
18
18
 
19
19
  - Create a docker image containing new version of gitlabform and publish to [github's package registry under gitlabform](https://github.com/gitlabform/gitlabform/pkgs/container/gitlabform).
20
20
  - Upload new version of gitlabform to [pypi package registry under gitlabform](https://pypi.org/project/gitlabform/).
21
- - A corresponding [GitHub release](https://github.com/gitlabform/gitlabform/releases) will be created that references the new tag.
21
+ - A corresponding [GitHub release](https://github.com/gitlabform/gitlabform/releases) will be created that references the new tag, with the version's changelog entry as its release notes.
22
22
 
23
23
  The release workflow also verifies that the commit on `main` passed the build and quality. It will trigger a release workflow that will proceed only if a corresponding version tag exists in GitHub and main branch workflow on that commit passed. The release workflow can also be triggered manually, which will require 2 inputs: a release version tag and main branch workflow's run id from corresponding commit.
24
-
25
- 3. Edit the release in GitHub and copy the changelog entry into its description.
@@ -28,7 +28,7 @@ from gitlabform.constants import (
28
28
  DIFF_LOG_LEVEL,
29
29
  NOTICE_LOG_LEVEL,
30
30
  )
31
- from gitlabform.gitlab import GitLab
31
+ from gitlabform.gitlab import GitLab, GitlabWrapper
32
32
  from gitlabform.gitlab.core import TestRequestFailedException
33
33
  from gitlabform.lists import Entities
34
34
  from gitlabform.lists.filter import GroupsAndProjectsFilters
@@ -130,13 +130,14 @@ class GitLabForm:
130
130
  self.application_processors = ApplicationProcessors(self.gitlab, self.configuration, self.strict)
131
131
  self.group_processors = GroupProcessors(self.gitlab, self.configuration, self.strict)
132
132
  self.project_processors = ProjectProcessors(self.gitlab, self.configuration, self.strict, self.log_level)
133
+ gl = GitlabWrapper(self.gitlab).get_gitlab()
133
134
  self.groups_provider = GroupsProvider(
134
- self.gitlab,
135
+ gl,
135
136
  self.configuration,
136
137
  self.recurse_subgroups,
137
138
  )
138
139
  self.projects_provider = ProjectsProvider(
139
- self.gitlab,
140
+ gl,
140
141
  self.configuration,
141
142
  self.include_archived_projects,
142
143
  self.include_projects_scheduled_for_deletion,
@@ -582,7 +583,7 @@ class GitLabForm:
582
583
  error(f"Checking latest version failed:\n{e}")
583
584
  return
584
585
 
585
- latest_stable_text = "(the latest stable is {latest_version})"
586
+ latest_stable_text = f"(the latest stable is {latest_version})"
586
587
 
587
588
  if local_version == latest_version:
588
589
  version_info = "= the latest stable"
@@ -6,8 +6,7 @@ from typing import List
6
6
 
7
7
  from gitlab import Gitlab as GitlabClient, GraphQL
8
8
 
9
- from gitlabform.gitlab.groups import GitLabGroups
10
- from gitlabform.gitlab.projects import GitLabProjects
9
+ from gitlabform.gitlab.core import GitLabCore
11
10
  from gitlabform.gitlab.python_gitlab import PythonGitlab
12
11
 
13
12
 
@@ -38,12 +37,7 @@ class AccessLevel(enum.IntEnum):
38
37
  return [level.name.lower().replace("_", " ") for level in AccessLevel]
39
38
 
40
39
 
41
- # GitLabGroups and GitLabProjects stay as bases until gitlabform/lists/ and the few
42
- # processors that still call their methods are migrated to python-gitlab
43
- class GitLab(
44
- GitLabGroups,
45
- GitLabProjects,
46
- ):
40
+ class GitLab(GitLabCore):
47
41
  pass
48
42
 
49
43
 
@@ -64,6 +58,9 @@ class GitlabWrapper:
64
58
 
65
59
  default_gitlab_kwargs = {
66
60
  "retry_transient_errors": True,
61
+ # without this list calls use the server default page size of 20;
62
+ # the legacy REST layer always requested pages of 100
63
+ "per_page": 100,
67
64
  }
68
65
  renamed_gitlab_kwargs = {
69
66
  # Bandit is used for security scanning and it complains about 'private_token' being
@@ -101,9 +101,6 @@ class GitLabCore:
101
101
  def get_configuration(self):
102
102
  return self.configuration
103
103
 
104
- def get_project(self, project_and_group_or_id):
105
- return self._make_requests_to_api("projects/%s", project_and_group_or_id)
106
-
107
104
  def is_version_at_least(self, min_version: Union[str, version.Version]) -> bool:
108
105
  """
109
106
  Check if GitLab server version is at least the specified version
@@ -308,10 +305,6 @@ class NotFoundException(Exception):
308
305
  pass
309
306
 
310
307
 
311
- class InvalidParametersException(Exception):
312
- pass
313
-
314
-
315
308
  class UnexpectedResponseException(Exception):
316
309
  def __init__(self, message: str, response_status_code: int, response_text: str):
317
310
  self.message: str = message
@@ -2,7 +2,7 @@ import functools
2
2
  from typing import Union, Any, Optional, Dict, List
3
3
 
4
4
  import gitlab.const
5
- from gitlab import Gitlab, GitlabGetError, GraphQL
5
+ from gitlab import Gitlab, GitlabGetError, GitlabListError, GraphQL
6
6
  from gitlab.base import RESTObject
7
7
  from gitlab.v4.objects import Group, Project, User
8
8
 
@@ -90,6 +90,69 @@ class PythonGitlab(Gitlab):
90
90
 
91
91
  raise GitlabGetError("No group found when getting '%s'" % groupname, 404)
92
92
 
93
+ def get_group_descendants(self, group_id_or_path) -> List[Dict]:
94
+ group = self.groups.get(group_id_or_path, lazy=True)
95
+ return [descendant.asdict() for descendant in group.descendant_groups.list(get_all=True)]
96
+
97
+ def get_group_paths(self) -> List[str]:
98
+ """
99
+ :return: sorted list of group full paths
100
+ """
101
+ if self._is_admin():
102
+ groups = self.groups.list(get_all=True, all_available=True)
103
+ else:
104
+ # as a non-admin it's pointless to get groups with a lower role than Reporter
105
+ # - it's the minimal role that is needed to manage something (f.e. group labels)
106
+ groups = self.groups.list(get_all=True, min_access_level=20)
107
+ return sorted(group.full_path for group in groups)
108
+
109
+ def get_projects(self, group: str, include_archived: bool = False, only_names: bool = True) -> List:
110
+ """
111
+ :param group: group name
112
+ :param include_archived: set to True if archived projects should also be returned
113
+ :param only_names: set to False to get the whole project dicts
114
+ :return: sorted list of strings "group/project_name". Note that only projects from the "group" namespace are
115
+ returned, so if "group" (= members of this group) is also a member of some projects, they won't be
116
+ returned here.
117
+ """
118
+ list_args: Dict[str, Any] = {"include_subgroups": True}
119
+ # there are 3 states of the "archived" flag: true, false, undefined - we use the last 2
120
+ if not include_archived:
121
+ list_args["archived"] = False
122
+ if self._is_admin():
123
+ list_args["all_available"] = True
124
+ else:
125
+ # it's pointless to get projects with a lower role than Reporter
126
+ # - it's the minimal role that is needed to manage something (f.e. labels)
127
+ list_args["min_access_level"] = 20
128
+
129
+ try:
130
+ projects = self.groups.get(group, lazy=True).projects.list(get_all=True, **list_args)
131
+ except GitlabListError as e:
132
+ if e.response_code != 404:
133
+ raise
134
+ projects = []
135
+
136
+ # compare case-insensitively, because the group may be spelled with a different
137
+ # case in the config than its canonical path in GitLab; the returned paths
138
+ # are the canonical ones from GitLab
139
+ group_prefix = group.lower() + "/"
140
+ projects_in_group_namespace = [
141
+ project for project in projects if project.path_with_namespace.lower().startswith(group_prefix)
142
+ ]
143
+
144
+ if only_names:
145
+ return sorted(project.path_with_namespace for project in projects_in_group_namespace)
146
+ return sorted(
147
+ (project.asdict() for project in projects_in_group_namespace),
148
+ key=lambda project: project["path_with_namespace"],
149
+ )
150
+
151
+ @functools.lru_cache()
152
+ def _is_admin(self) -> bool:
153
+ current_user = self.http_get("/user")
154
+ return isinstance(current_user, dict) and bool(current_user.get("is_admin", False))
155
+
93
156
  # Uses "LIST" to get a user by username, to get the full User object, call get using the user's id
94
157
  @functools.lru_cache()
95
158
  def get_user_by_username_cached(self, username: str) -> User | None:
@@ -1,19 +1,21 @@
1
1
  import sys
2
2
  from logging import critical
3
3
  from gitlabform.constants import EXIT_INVALID_INPUT
4
- from gitlabform.gitlab.core import NotFoundException
4
+ from gitlab import GitlabGetError
5
+
6
+ from gitlabform.gitlab.python_gitlab import PythonGitlab
5
7
  from gitlabform.lists import OmissionReason, Groups
6
8
 
7
9
 
8
10
  class GroupsProvider:
9
11
  """
10
12
  For a query like "project/group", "group", "group/subgroup", ALL or ALL_DEFINED this
11
- class gets the effective lists of groups, taking into account skipped groups
12
- and the fact that the group and project names case are somewhat case-sensitive.
13
+ class gets the effective lists of groups, taking into account skipped groups,
14
+ even when the group and project paths in the config are spelled with a different case.
13
15
  """
14
16
 
15
- def __init__(self, gitlab, configuration, recurse_subgroups):
16
- self.gitlab = gitlab
17
+ def __init__(self, gl: PythonGitlab, configuration, recurse_subgroups):
18
+ self.gl = gl
17
19
  self.configuration = configuration
18
20
  self.recurse_subgroups = recurse_subgroups
19
21
 
@@ -35,22 +37,25 @@ class GroupsProvider:
35
37
 
36
38
  # it may be a subgroup or a group...
37
39
  try:
38
- maybe_group = self.gitlab.get_group_case_insensitive(target)
39
- path = maybe_group["full_path"]
40
- groups.add_requested([path])
40
+ # GitLab resolves group paths case-insensitively and returns the canonical path
41
+ maybe_group = self.gl.get_group_by_path_cached(target)
42
+ except GitlabGetError as e:
43
+ if e.response_code != 404:
44
+ raise
45
+ # ...or a single project, which we ignore here
46
+ return groups
41
47
 
42
- if recurse_subgroups:
43
- descendants = self.gitlab.get_group_descendants(path)
44
- groups.add_requested([group["full_path"] for group in descendants])
48
+ path = maybe_group.full_path
49
+ groups.add_requested([path])
45
50
 
46
- groups.add_omitted(
47
- OmissionReason.SKIPPED,
48
- self._get_skipped_groups(groups.get_effective()),
49
- )
51
+ if recurse_subgroups:
52
+ descendants = self.gl.get_group_descendants(path)
53
+ groups.add_requested([group["full_path"] for group in descendants])
50
54
 
51
- except NotFoundException:
52
- # ...or a single project, which we ignore here
53
- pass
55
+ groups.add_omitted(
56
+ OmissionReason.SKIPPED,
57
+ self._get_skipped_groups(groups.get_effective()),
58
+ )
54
59
 
55
60
  return groups
56
61
 
@@ -58,7 +63,7 @@ class GroupsProvider:
58
63
  groups = Groups()
59
64
 
60
65
  if target == "ALL":
61
- groups.add_requested(self.gitlab.get_groups())
66
+ groups.add_requested(self.gl.get_group_paths())
62
67
  else: # ALL_DEFINED
63
68
  groups.add_requested(self.configuration.get_groups())
64
69
 
@@ -73,8 +78,10 @@ class GroupsProvider:
73
78
  def _verify_if_groups_exist(self, groups: list):
74
79
  for group in groups:
75
80
  try:
76
- self.gitlab.get_group_case_insensitive(group)
77
- except NotFoundException:
81
+ self.gl.get_group_by_path_cached(group)
82
+ except GitlabGetError as e:
83
+ if e.response_code != 404:
84
+ raise
78
85
  critical(f"Configuration contains group {group} but it cannot be found in GitLab!")
79
86
  sys.exit(EXIT_INVALID_INPUT)
80
87