Loading docs/gl_objects/protected_container_repositories.rst +4 −4 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ References + :class:`gitlab.v4.objects.ProjectRegistryRepositoryProtectionRuleRule` + :class:`gitlab.v4.objects.ProjectRegistryRepositoryProtectionRuleRuleManager` + :attr:`gitlab.v4.objects.Project.registry_repository_protection_rules` + :attr:`gitlab.v4.objects.Project.registry_protection_repository_rules` * GitLab API: https://docs.gitlab.com/ee/api/container_repository_protection_rules.html Loading @@ -20,11 +20,11 @@ Examples List the container registry protection rules for a project:: registry_rules = project.registry_repository_protection_rules.list() registry_rules = project.registry_protection_repository_rules.list() Create a container registry protection rule:: registry_rule = project.registry_repository_protection_rules.create( registry_rule = project.registry_protection_repository_rules.create( { 'repository_path_pattern': 'test/image', 'minimum_access_level_for_push': 'maintainer', Loading @@ -39,6 +39,6 @@ Update a container registry protection rule:: Delete a container registry protection rule:: registry_rule = project.registry_repository_protection_rules.delete(registry_rule.id) registry_rule = project.registry_protection_repository_rules.delete(registry_rule.id) # or registry_rule.delete() gitlab/v4/objects/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ from .pipelines import * from .project_access_tokens import * from .projects import * from .push_rules import * from .registry_protection_repository_rules import * from .registry_protection_rules import * from .registry_repository_protection_rules import * from .releases import * from .repositories import * from .resource_groups import * Loading gitlab/v4/objects/projects.py +4 −4 Original line number Diff line number Diff line Loading @@ -86,12 +86,12 @@ from .pipelines import ( # noqa: F401 ) from .project_access_tokens import ProjectAccessTokenManager # noqa: F401 from .push_rules import ProjectPushRulesManager # noqa: F401 from .registry_protection_repository_rules import ( # noqa: F401 ProjectRegistryRepositoryProtectionRuleManager, ) from .registry_protection_rules import ( # noqa: F401; deprecated ProjectRegistryProtectionRuleManager, ) from .registry_repository_protection_rules import ( # noqa: F401 ProjectRegistryRepositoryProtectionRuleManager, ) from .releases import ProjectReleaseManager # noqa: F401 from .repositories import RepositoryMixin from .resource_groups import ProjectResourceGroupManager Loading Loading @@ -242,7 +242,7 @@ class Project( protectedtags: ProjectProtectedTagManager pushrules: ProjectPushRulesManager registry_protection_rules: ProjectRegistryProtectionRuleManager registry_repository_protection_rules: ProjectRegistryRepositoryProtectionRuleManager registry_protection_repository_rules: ProjectRegistryRepositoryProtectionRuleManager releases: ProjectReleaseManager resource_groups: ProjectResourceGroupManager remote_mirrors: "ProjectRemoteMirrorManager" Loading gitlab/v4/objects/registry_repository_protection_rules.py→gitlab/v4/objects/registry_protection_repository_rules.py +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ class ProjectRegistryRepositoryProtectionRule(SaveMixin, RESTObject): class ProjectRegistryRepositoryProtectionRuleManager( ListMixin, CreateMixin, UpdateMixin, RESTManager ): _path = "/projects/{project_id}/registry/repository/protection/rules" _path = "/projects/{project_id}/registry/protection/repository/rules" _obj_cls = ProjectRegistryRepositoryProtectionRule _from_parent_attrs = {"project_id": "id"} _create_attrs = RequiredOptional( Loading tests/functional/api/test_registry.py +2 −2 Original line number Diff line number Diff line Loading @@ -11,10 +11,10 @@ def protected_registry_feature(gl: Gitlab): @pytest.mark.skip(reason="Not released yet") def test_project_protected_registry(project: Project): rules = project.registry_repository_protection_rules.list() rules = project.registry_protection_repository_rules.list() assert isinstance(rules, list) protected_registry = project.registry_repository_protection_rules.create( protected_registry = project.registry_protection_repository_rules.create( { "repository_path_pattern": "test/image", "minimum_access_level_for_push": "maintainer", Loading Loading
docs/gl_objects/protected_container_repositories.rst +4 −4 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ References + :class:`gitlab.v4.objects.ProjectRegistryRepositoryProtectionRuleRule` + :class:`gitlab.v4.objects.ProjectRegistryRepositoryProtectionRuleRuleManager` + :attr:`gitlab.v4.objects.Project.registry_repository_protection_rules` + :attr:`gitlab.v4.objects.Project.registry_protection_repository_rules` * GitLab API: https://docs.gitlab.com/ee/api/container_repository_protection_rules.html Loading @@ -20,11 +20,11 @@ Examples List the container registry protection rules for a project:: registry_rules = project.registry_repository_protection_rules.list() registry_rules = project.registry_protection_repository_rules.list() Create a container registry protection rule:: registry_rule = project.registry_repository_protection_rules.create( registry_rule = project.registry_protection_repository_rules.create( { 'repository_path_pattern': 'test/image', 'minimum_access_level_for_push': 'maintainer', Loading @@ -39,6 +39,6 @@ Update a container registry protection rule:: Delete a container registry protection rule:: registry_rule = project.registry_repository_protection_rules.delete(registry_rule.id) registry_rule = project.registry_protection_repository_rules.delete(registry_rule.id) # or registry_rule.delete()
gitlab/v4/objects/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ from .pipelines import * from .project_access_tokens import * from .projects import * from .push_rules import * from .registry_protection_repository_rules import * from .registry_protection_rules import * from .registry_repository_protection_rules import * from .releases import * from .repositories import * from .resource_groups import * Loading
gitlab/v4/objects/projects.py +4 −4 Original line number Diff line number Diff line Loading @@ -86,12 +86,12 @@ from .pipelines import ( # noqa: F401 ) from .project_access_tokens import ProjectAccessTokenManager # noqa: F401 from .push_rules import ProjectPushRulesManager # noqa: F401 from .registry_protection_repository_rules import ( # noqa: F401 ProjectRegistryRepositoryProtectionRuleManager, ) from .registry_protection_rules import ( # noqa: F401; deprecated ProjectRegistryProtectionRuleManager, ) from .registry_repository_protection_rules import ( # noqa: F401 ProjectRegistryRepositoryProtectionRuleManager, ) from .releases import ProjectReleaseManager # noqa: F401 from .repositories import RepositoryMixin from .resource_groups import ProjectResourceGroupManager Loading Loading @@ -242,7 +242,7 @@ class Project( protectedtags: ProjectProtectedTagManager pushrules: ProjectPushRulesManager registry_protection_rules: ProjectRegistryProtectionRuleManager registry_repository_protection_rules: ProjectRegistryRepositoryProtectionRuleManager registry_protection_repository_rules: ProjectRegistryRepositoryProtectionRuleManager releases: ProjectReleaseManager resource_groups: ProjectResourceGroupManager remote_mirrors: "ProjectRemoteMirrorManager" Loading
gitlab/v4/objects/registry_repository_protection_rules.py→gitlab/v4/objects/registry_protection_repository_rules.py +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ class ProjectRegistryRepositoryProtectionRule(SaveMixin, RESTObject): class ProjectRegistryRepositoryProtectionRuleManager( ListMixin, CreateMixin, UpdateMixin, RESTManager ): _path = "/projects/{project_id}/registry/repository/protection/rules" _path = "/projects/{project_id}/registry/protection/repository/rules" _obj_cls = ProjectRegistryRepositoryProtectionRule _from_parent_attrs = {"project_id": "id"} _create_attrs = RequiredOptional( Loading
tests/functional/api/test_registry.py +2 −2 Original line number Diff line number Diff line Loading @@ -11,10 +11,10 @@ def protected_registry_feature(gl: Gitlab): @pytest.mark.skip(reason="Not released yet") def test_project_protected_registry(project: Project): rules = project.registry_repository_protection_rules.list() rules = project.registry_protection_repository_rules.list() assert isinstance(rules, list) protected_registry = project.registry_repository_protection_rules.create( protected_registry = project.registry_protection_repository_rules.create( { "repository_path_pattern": "test/image", "minimum_access_level_for_push": "maintainer", Loading