mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-19 17:01:25 -07:00
multiple modules: improve dict.items() loops (#8876)
* multiple modules: improve dict.items() loops * simplify in memset_* modules * add changelog frag
This commit is contained in:
parent
80f48cceb4
commit
6af74d1ba6
16 changed files with 44 additions and 43 deletions
|
@ -263,15 +263,15 @@ class GitlabMergeRequest(object):
|
|||
key = 'force_remove_source_branch'
|
||||
|
||||
if key == 'assignee_ids':
|
||||
if options[key] != sorted([user["id"] for user in getattr(mr, 'assignees')]):
|
||||
if value != sorted([user["id"] for user in getattr(mr, 'assignees')]):
|
||||
return True
|
||||
|
||||
elif key == 'reviewer_ids':
|
||||
if options[key] != sorted([user["id"] for user in getattr(mr, 'reviewers')]):
|
||||
if value != sorted([user["id"] for user in getattr(mr, 'reviewers')]):
|
||||
return True
|
||||
|
||||
elif key == 'labels':
|
||||
if options[key] != sorted(getattr(mr, key)):
|
||||
if value != sorted(getattr(mr, key)):
|
||||
return True
|
||||
|
||||
elif getattr(mr, key) != value:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue