community.general/tests/unit/plugins
patchback[bot] 053d0aec28
[PR #10795/f772bcda backport][stable-11] gitlab_protected_branch: refactor, add allow_force_push, code_owner_approval_required (#10803)
gitlab_protected_branch: refactor, add `allow_force_push`, `code_owner_approval_required` (#10795)

* gitlab_protected_branch: fix typo

* gitlab_protected_branch: lump parameters into options dictionary

Hardcoding parameter lists gets repetitive. Refactor this module to use
an options dictionary like many other gitlab_* modules. This makes it
cleaner to add new options.

* gitlab_protected_branch: update when possible

Until now, the module deletes and re-creates the protected branch if any
change is detected. This makes sense for the access level parameters, as
these are not easily mutated after creation.

However, in order to add further options which _can_ easily be updated,
we should support updating by default, unless known-immutable parameters
are changing.

* gitlab_protected_branch: add `allow_force_push` option

* gitlab_protected_branch: add `code_owner_approval_required` option

* gitlab_protected_branch: add issues to changelog

* Update changelog.

---------


(cherry picked from commit f772bcda88)

Co-authored-by: David Phillips <phillid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-09-08 19:06:38 +02:00
..
become add systemd run0 as a become method (#8306) 2024-05-11 16:53:44 +02:00
cache Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
callback Callbacks: use ansible-core's version instead of trying to extract it (#10193) 2025-06-02 20:45:18 +02:00
connection [PR #10531/d0b0aff5 backport][stable-11] wsl connection: import paramiko directly (#10534) 2025-08-01 11:18:50 +02:00
filter Unit tests: replace mock and compat with code from community.internal_test_tools (#9921) 2025-03-22 14:12:56 +01:00
inventory [PR #10712/cb84fa74 backport][stable-11] remove extra brackets when params are a given by a comprehension (#10725) 2025-08-23 19:43:27 +02:00
lookup [PR #10664/65bc4706 backport][stable-11] GitHub app access token lookup: allow to use PyJWT + cryptography instead of jwt (#10720) 2025-08-23 19:45:03 +02:00
module_utils [PR #10264/74ed0fc4 backport][stable-11] import mocks from community.internal_test_tools (#10266) 2025-06-17 21:24:13 +02:00
modules [PR #10795/f772bcda backport][stable-11] gitlab_protected_branch: refactor, add allow_force_push, code_owner_approval_required (#10803) 2025-09-08 19:06:38 +02:00
plugin_utils Use more unit test utils from community.internal_test_tools (#9918) 2025-03-22 13:12:31 +01:00