gitlabform 3.9.2__tar.gz → 3.9.4__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.
- {gitlabform-3.9.2 → gitlabform-3.9.4}/LICENSE +1 -1
- {gitlabform-3.9.2 → gitlabform-3.9.4}/PKG-INFO +6 -6
- {gitlabform-3.9.2 → gitlabform-3.9.4}/README.md +1 -1
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/__init__.py +12 -8
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/core.py +3 -3
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/abstract_processor.py +10 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform.egg-info/PKG-INFO +6 -6
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform.egg-info/requires.txt +4 -4
- {gitlabform-3.9.2 → gitlabform-3.9.4}/setup.py +4 -4
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/__init__.py +2 -1
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_running.py +17 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_transfer_project.py +24 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/configuration/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/configuration/common.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/configuration/core.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/configuration/groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/configuration/projects.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/configuration/transform.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/constants.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/branches.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/commits.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/group_badges.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/group_ldap_links.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/group_variables.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/integrations.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/members.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/merge_requests.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/pipelines.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/project_badges.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/project_deploy_keys.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/project_merge_requests_approvals.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/project_protected_environments.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/projects.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/repositories.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/resource_groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/schedules.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/users.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/gitlab/variables.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/lists/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/lists/filter.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/lists/groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/lists/projects.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/output.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/defining_keys.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_badges_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_ldap_links_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_members_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_settings_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_variables_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/multiple_entities_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/badges_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/branches_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/deploy_keys_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/files_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/hooks_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/integrations_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/members_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/merge_requests_approval_rules.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/merge_requests_approvals.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/project_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/project_push_rules_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/project_settings_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/resource_groups_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/schedules_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/tags_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/variables_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/shared/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/shared/protected_environments_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/single_entity_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/util/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/util/branch_protector.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/util/decorators.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/util/difference_logger.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/run.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/util.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform.egg-info/SOURCES.txt +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform.egg-info/dependency_links.txt +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform.egg-info/entry_points.txt +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform.egg-info/top_level.txt +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/setup.cfg +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/conftest.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_archive_project.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_badges.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_branches.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_deploy_keys.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_deploy_keys_all_projects.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_files.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_files_all.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_files_protected.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_files_templates.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_group_badges.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_group_members_case_insensitive.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_group_members_groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_group_members_users.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_group_settings.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_group_variables.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_hooks.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_inheritance_break.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_integrations.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_members.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_members_add_group.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_members_enforce.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_project_group_members_case_insensitive.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_project_members_case_insensitve.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_project_settings.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_resource_groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_schedules.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_tags.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_token_from_config.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_variables.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_case_sensitivity.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_inheritance_break_projects_and_groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_inheritance_break_subgroups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_inheritance_break_validation.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_projects_and_groups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_skip_groups_skip_projects.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_subgroups.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_yaml_version.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/processors/__init__.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/processors/test_abstract_processor.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/processors/test_branch_protector.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/processors/test_difference_logger.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/test_access_levels.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/test_non_empty_configs_provider.py +0 -0
- {gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2016-
|
|
3
|
+
Copyright (c) 2016-2024 Greg Dubicki and Contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gitlabform
|
|
3
|
-
Version: 3.9.
|
|
3
|
+
Version: 3.9.4
|
|
4
4
|
Summary: 🏗 Specialized configuration as a code tool for GitLab projects, groups and more using hierarchical configuration written in YAML
|
|
5
5
|
Home-page: https://gitlabform.github.io/gitlabform
|
|
6
6
|
Author: Greg Dubicki and Contributors
|
|
@@ -25,31 +25,31 @@ Requires-Dist: certifi
|
|
|
25
25
|
Requires-Dist: cli-ui==0.17.2
|
|
26
26
|
Requires-Dist: ez-yaml==1.2.0
|
|
27
27
|
Requires-Dist: Jinja2==3.1.3
|
|
28
|
-
Requires-Dist: luddite==1.0.
|
|
28
|
+
Requires-Dist: luddite==1.0.4
|
|
29
29
|
Requires-Dist: MarkupSafe==2.1.5
|
|
30
30
|
Requires-Dist: mergedeep==1.3.4
|
|
31
31
|
Requires-Dist: packaging==24.0
|
|
32
32
|
Requires-Dist: python-gitlab==4.4.0
|
|
33
33
|
Requires-Dist: requests==2.31.0
|
|
34
34
|
Requires-Dist: ruamel.yaml==0.17.21
|
|
35
|
-
Requires-Dist: types-requests==2.31.0.
|
|
35
|
+
Requires-Dist: types-requests==2.31.0.20240406
|
|
36
36
|
Requires-Dist: yamlpath==3.8.2
|
|
37
37
|
Provides-Extra: test
|
|
38
38
|
Requires-Dist: coverage==7.4.4; extra == "test"
|
|
39
39
|
Requires-Dist: cryptography==42.0.5; extra == "test"
|
|
40
|
-
Requires-Dist: deepdiff==
|
|
40
|
+
Requires-Dist: deepdiff==7.0.1; extra == "test"
|
|
41
41
|
Requires-Dist: mypy==1.9.0; extra == "test"
|
|
42
42
|
Requires-Dist: mypy-extensions==1.0.0; extra == "test"
|
|
43
43
|
Requires-Dist: pre-commit==2.21.0; extra == "test"
|
|
44
44
|
Requires-Dist: pytest==8.1.1; extra == "test"
|
|
45
45
|
Requires-Dist: pytest-cov==5.0.0; extra == "test"
|
|
46
46
|
Requires-Dist: pytest-rerunfailures==14.0; extra == "test"
|
|
47
|
-
Requires-Dist: xkcdpass==1.19.
|
|
47
|
+
Requires-Dist: xkcdpass==1.19.9; extra == "test"
|
|
48
48
|
Provides-Extra: docs
|
|
49
49
|
Requires-Dist: mkdocs; extra == "docs"
|
|
50
50
|
Requires-Dist: mkdocs-material; extra == "docs"
|
|
51
51
|
|
|
52
|
-
[](https://badge.fury.io/gh/gitlabform%2Fgitlabform)
|
|
53
53
|

|
|
54
54
|
[](https://pepy.tech/project/gitlabform)
|
|
55
55
|
[](https://github.com/psf/black)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://badge.fury.io/gh/gitlabform%2Fgitlabform)
|
|
2
2
|

|
|
3
3
|
[](https://pepy.tech/project/gitlabform)
|
|
4
4
|
[](https://github.com/psf/black)
|
|
@@ -5,7 +5,7 @@ import argparse
|
|
|
5
5
|
import cli_ui
|
|
6
6
|
import logging
|
|
7
7
|
import luddite
|
|
8
|
-
import
|
|
8
|
+
from importlib.metadata import version as package_version
|
|
9
9
|
import textwrap
|
|
10
10
|
import traceback
|
|
11
11
|
from cli_ui import (
|
|
@@ -25,7 +25,7 @@ from cli_ui import (
|
|
|
25
25
|
purple,
|
|
26
26
|
warning,
|
|
27
27
|
)
|
|
28
|
-
from packaging import version
|
|
28
|
+
from packaging import version
|
|
29
29
|
from typing import Any, Tuple
|
|
30
30
|
|
|
31
31
|
from gitlabform.configuration import Configuration
|
|
@@ -47,7 +47,13 @@ from gitlabform.processors.project import ProjectProcessors
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class GitLabForm:
|
|
50
|
-
def __init__(
|
|
50
|
+
def __init__(
|
|
51
|
+
self,
|
|
52
|
+
include_archived_projects=True,
|
|
53
|
+
target=None,
|
|
54
|
+
config_string=None,
|
|
55
|
+
noop=False,
|
|
56
|
+
):
|
|
51
57
|
if target and config_string:
|
|
52
58
|
# this mode is basically only for testing
|
|
53
59
|
|
|
@@ -58,7 +64,7 @@ class GitLabForm:
|
|
|
58
64
|
self.strict = True
|
|
59
65
|
self.start_from = 1
|
|
60
66
|
self.start_from_group = 1
|
|
61
|
-
self.noop =
|
|
67
|
+
self.noop = noop
|
|
62
68
|
self.output_file = None
|
|
63
69
|
self.skip_version_check = True
|
|
64
70
|
self.include_archived_projects = include_archived_projects
|
|
@@ -508,7 +514,7 @@ class GitLabForm:
|
|
|
508
514
|
:param skip_version_check: if True then the comparison to the latest versions is skipped
|
|
509
515
|
"""
|
|
510
516
|
|
|
511
|
-
local_version =
|
|
517
|
+
local_version = package_version("gitlabform")
|
|
512
518
|
|
|
513
519
|
# fmt: off
|
|
514
520
|
tower_crane = Symbol("🏗", "")
|
|
@@ -533,9 +539,7 @@ class GitLabForm:
|
|
|
533
539
|
happy = Symbol("😊", ":)")
|
|
534
540
|
to_show = ["= the latest stable ", happy]
|
|
535
541
|
# fmt: on
|
|
536
|
-
elif
|
|
537
|
-
latest_version
|
|
538
|
-
):
|
|
542
|
+
elif version.parse(local_version) < version.parse(latest_version):
|
|
539
543
|
# fmt: off
|
|
540
544
|
sad = Symbol("😔", ":(")
|
|
541
545
|
to_show = ["= outdated ", sad, " , please update! (the latest stable is ", latest_version, ")"]
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
from logging import debug
|
|
4
4
|
from urllib import parse
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
from importlib.metadata import version as package_version
|
|
7
7
|
import requests
|
|
8
8
|
|
|
9
9
|
# noinspection PyPackageRequirements
|
|
@@ -42,8 +42,8 @@ class GitLabCore:
|
|
|
42
42
|
if not self.ssl_verify:
|
|
43
43
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
44
44
|
|
|
45
|
-
self.gitlabform_version =
|
|
46
|
-
self.requests_version =
|
|
45
|
+
self.gitlabform_version = package_version("gitlabform")
|
|
46
|
+
self.requests_version = package_version("requests")
|
|
47
47
|
self.session.headers.update(
|
|
48
48
|
{
|
|
49
49
|
"private-token": self.token,
|
|
@@ -51,6 +51,16 @@ class AbstractProcessor(ABC):
|
|
|
51
51
|
verbose(
|
|
52
52
|
f"Processing section '{self.configuration_name}' in dry-run mode."
|
|
53
53
|
)
|
|
54
|
+
try:
|
|
55
|
+
project_transfer_source = configuration["project"]["transfer_from"]
|
|
56
|
+
verbose(
|
|
57
|
+
f"""Project {project_or_project_and_group} is configured to be transferred,
|
|
58
|
+
diffing config from transfer source project {project_transfer_source}."""
|
|
59
|
+
)
|
|
60
|
+
project_or_project_and_group = project_transfer_source
|
|
61
|
+
except KeyError:
|
|
62
|
+
pass
|
|
63
|
+
|
|
54
64
|
self._print_diff(
|
|
55
65
|
project_or_project_and_group,
|
|
56
66
|
configuration.get(self.configuration_name),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gitlabform
|
|
3
|
-
Version: 3.9.
|
|
3
|
+
Version: 3.9.4
|
|
4
4
|
Summary: 🏗 Specialized configuration as a code tool for GitLab projects, groups and more using hierarchical configuration written in YAML
|
|
5
5
|
Home-page: https://gitlabform.github.io/gitlabform
|
|
6
6
|
Author: Greg Dubicki and Contributors
|
|
@@ -25,31 +25,31 @@ Requires-Dist: certifi
|
|
|
25
25
|
Requires-Dist: cli-ui==0.17.2
|
|
26
26
|
Requires-Dist: ez-yaml==1.2.0
|
|
27
27
|
Requires-Dist: Jinja2==3.1.3
|
|
28
|
-
Requires-Dist: luddite==1.0.
|
|
28
|
+
Requires-Dist: luddite==1.0.4
|
|
29
29
|
Requires-Dist: MarkupSafe==2.1.5
|
|
30
30
|
Requires-Dist: mergedeep==1.3.4
|
|
31
31
|
Requires-Dist: packaging==24.0
|
|
32
32
|
Requires-Dist: python-gitlab==4.4.0
|
|
33
33
|
Requires-Dist: requests==2.31.0
|
|
34
34
|
Requires-Dist: ruamel.yaml==0.17.21
|
|
35
|
-
Requires-Dist: types-requests==2.31.0.
|
|
35
|
+
Requires-Dist: types-requests==2.31.0.20240406
|
|
36
36
|
Requires-Dist: yamlpath==3.8.2
|
|
37
37
|
Provides-Extra: test
|
|
38
38
|
Requires-Dist: coverage==7.4.4; extra == "test"
|
|
39
39
|
Requires-Dist: cryptography==42.0.5; extra == "test"
|
|
40
|
-
Requires-Dist: deepdiff==
|
|
40
|
+
Requires-Dist: deepdiff==7.0.1; extra == "test"
|
|
41
41
|
Requires-Dist: mypy==1.9.0; extra == "test"
|
|
42
42
|
Requires-Dist: mypy-extensions==1.0.0; extra == "test"
|
|
43
43
|
Requires-Dist: pre-commit==2.21.0; extra == "test"
|
|
44
44
|
Requires-Dist: pytest==8.1.1; extra == "test"
|
|
45
45
|
Requires-Dist: pytest-cov==5.0.0; extra == "test"
|
|
46
46
|
Requires-Dist: pytest-rerunfailures==14.0; extra == "test"
|
|
47
|
-
Requires-Dist: xkcdpass==1.19.
|
|
47
|
+
Requires-Dist: xkcdpass==1.19.9; extra == "test"
|
|
48
48
|
Provides-Extra: docs
|
|
49
49
|
Requires-Dist: mkdocs; extra == "docs"
|
|
50
50
|
Requires-Dist: mkdocs-material; extra == "docs"
|
|
51
51
|
|
|
52
|
-
[](https://badge.fury.io/gh/gitlabform%2Fgitlabform)
|
|
53
53
|

|
|
54
54
|
[](https://pepy.tech/project/gitlabform)
|
|
55
55
|
[](https://github.com/psf/black)
|
|
@@ -2,14 +2,14 @@ certifi
|
|
|
2
2
|
cli-ui==0.17.2
|
|
3
3
|
ez-yaml==1.2.0
|
|
4
4
|
Jinja2==3.1.3
|
|
5
|
-
luddite==1.0.
|
|
5
|
+
luddite==1.0.4
|
|
6
6
|
MarkupSafe==2.1.5
|
|
7
7
|
mergedeep==1.3.4
|
|
8
8
|
packaging==24.0
|
|
9
9
|
python-gitlab==4.4.0
|
|
10
10
|
requests==2.31.0
|
|
11
11
|
ruamel.yaml==0.17.21
|
|
12
|
-
types-requests==2.31.0.
|
|
12
|
+
types-requests==2.31.0.20240406
|
|
13
13
|
yamlpath==3.8.2
|
|
14
14
|
|
|
15
15
|
[docs]
|
|
@@ -19,11 +19,11 @@ mkdocs-material
|
|
|
19
19
|
[test]
|
|
20
20
|
coverage==7.4.4
|
|
21
21
|
cryptography==42.0.5
|
|
22
|
-
deepdiff==
|
|
22
|
+
deepdiff==7.0.1
|
|
23
23
|
mypy==1.9.0
|
|
24
24
|
mypy-extensions==1.0.0
|
|
25
25
|
pre-commit==2.21.0
|
|
26
26
|
pytest==8.1.1
|
|
27
27
|
pytest-cov==5.0.0
|
|
28
28
|
pytest-rerunfailures==14.0
|
|
29
|
-
xkcdpass==1.19.
|
|
29
|
+
xkcdpass==1.19.9
|
|
@@ -48,28 +48,28 @@ setup(
|
|
|
48
48
|
"cli-ui==0.17.2",
|
|
49
49
|
"ez-yaml==1.2.0",
|
|
50
50
|
"Jinja2==3.1.3",
|
|
51
|
-
"luddite==1.0.
|
|
51
|
+
"luddite==1.0.4",
|
|
52
52
|
"MarkupSafe==2.1.5",
|
|
53
53
|
"mergedeep==1.3.4",
|
|
54
54
|
"packaging==24.0",
|
|
55
55
|
"python-gitlab==4.4.0",
|
|
56
56
|
"requests==2.31.0",
|
|
57
57
|
"ruamel.yaml==0.17.21",
|
|
58
|
-
"types-requests==2.31.0.
|
|
58
|
+
"types-requests==2.31.0.20240406",
|
|
59
59
|
"yamlpath==3.8.2",
|
|
60
60
|
],
|
|
61
61
|
extras_require={
|
|
62
62
|
"test": [
|
|
63
63
|
"coverage==7.4.4",
|
|
64
64
|
"cryptography==42.0.5",
|
|
65
|
-
"deepdiff==
|
|
65
|
+
"deepdiff==7.0.1",
|
|
66
66
|
"mypy==1.9.0",
|
|
67
67
|
"mypy-extensions==1.0.0",
|
|
68
68
|
"pre-commit==2.21.0", # not really for tests, but for development
|
|
69
69
|
"pytest==8.1.1",
|
|
70
70
|
"pytest-cov==5.0.0",
|
|
71
71
|
"pytest-rerunfailures==14.0",
|
|
72
|
-
"xkcdpass==1.19.
|
|
72
|
+
"xkcdpass==1.19.9",
|
|
73
73
|
],
|
|
74
74
|
"docs": [
|
|
75
75
|
"mkdocs",
|
|
@@ -247,7 +247,7 @@ def randomize_case(input: str) -> str:
|
|
|
247
247
|
return "".join(random.choice((str.upper, str.lower))(char) for char in input)
|
|
248
248
|
|
|
249
249
|
|
|
250
|
-
def run_gitlabform(config, target, include_archived_projects=True):
|
|
250
|
+
def run_gitlabform(config, target, include_archived_projects=True, noop=False):
|
|
251
251
|
# f-strings with """ used as configs have the disadvantage of having indentation in them - let's remove it here
|
|
252
252
|
config = textwrap.dedent(config)
|
|
253
253
|
|
|
@@ -264,5 +264,6 @@ def run_gitlabform(config, target, include_archived_projects=True):
|
|
|
264
264
|
include_archived_projects=include_archived_projects,
|
|
265
265
|
config_string=config,
|
|
266
266
|
target=target,
|
|
267
|
+
noop=noop,
|
|
267
268
|
)
|
|
268
269
|
gf.run()
|
|
@@ -22,6 +22,23 @@ class TestRunning:
|
|
|
22
22
|
other_project = gl.projects.get(other_project.id)
|
|
23
23
|
assert other_project.request_access_enabled is True
|
|
24
24
|
|
|
25
|
+
# noinspection PyPep8Naming
|
|
26
|
+
def test__ALL_dry_run(self, gl, project, other_project):
|
|
27
|
+
config = f"""
|
|
28
|
+
projects_and_groups:
|
|
29
|
+
'*':
|
|
30
|
+
project_settings:
|
|
31
|
+
request_access_enabled: false
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
run_gitlabform(config, "ALL", noop=True)
|
|
35
|
+
|
|
36
|
+
project = gl.projects.get(project.id)
|
|
37
|
+
assert project.request_access_enabled is True
|
|
38
|
+
|
|
39
|
+
other_project = gl.projects.get(other_project.id)
|
|
40
|
+
assert other_project.request_access_enabled is True
|
|
41
|
+
|
|
25
42
|
# noinspection PyPep8Naming
|
|
26
43
|
def test__ALL_DEFINED(self, gl, project, other_project):
|
|
27
44
|
config = f"""
|
|
@@ -9,6 +9,30 @@ import pytest
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class TestTransferProject:
|
|
12
|
+
def test__transfer_between_two_root_groups_dry_run(
|
|
13
|
+
self, project_for_function, group, other_group
|
|
14
|
+
):
|
|
15
|
+
project_new_path_with_namespace = (
|
|
16
|
+
f"{other_group.path}/{project_for_function.name}"
|
|
17
|
+
)
|
|
18
|
+
projects_in_destination_before_transfer = other_group.projects.list()
|
|
19
|
+
|
|
20
|
+
config = f"""
|
|
21
|
+
projects_and_groups:
|
|
22
|
+
{project_new_path_with_namespace}:
|
|
23
|
+
project:
|
|
24
|
+
transfer_from: {project_for_function.path_with_namespace}
|
|
25
|
+
project_settings:
|
|
26
|
+
description: test
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
run_gitlabform(config, project_new_path_with_namespace, noop=True)
|
|
30
|
+
projects_in_destination_after_transfer = other_group.projects.list()
|
|
31
|
+
|
|
32
|
+
assert len(projects_in_destination_after_transfer) == len(
|
|
33
|
+
projects_in_destination_before_transfer
|
|
34
|
+
)
|
|
35
|
+
|
|
12
36
|
def test__transfer_between_two_root_groups(
|
|
13
37
|
self, project_for_function, group, other_group
|
|
14
38
|
):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_ldap_links_processor.py
RENAMED
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_members_processor.py
RENAMED
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_settings_processor.py
RENAMED
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/group/group_variables_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/deploy_keys_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/integrations_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/merge_requests_approval_rules.py
RENAMED
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/merge_requests_approvals.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/project_push_rules_processor.py
RENAMED
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/project_settings_processor.py
RENAMED
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/gitlabform/processors/project/resource_groups_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_deploy_keys_all_projects.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/tests/acceptance/standard/test_group_members_groups.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_inheritance_break_subgroups.py
RENAMED
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_inheritance_break_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitlabform-3.9.2 → gitlabform-3.9.4}/tests/unit/configuration/test_skip_groups_skip_projects.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|