qontract-reconcile 0.10.2.dev102__py3-none-any.whl → 0.10.2.dev103__py3-none-any.whl
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.
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev103.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev103.dist-info}/RECORD +5 -5
- reconcile/gitlab_owners.py +14 -0
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev103.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev103.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev103.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev103
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
|
6
6
|
Project-URL: repository, https://github.com/app-sre/qontract-reconcile
|
{qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev103.dist-info}/RECORD
RENAMED
@@ -34,7 +34,7 @@ reconcile/gitlab_housekeeping.py,sha256=Gy1mhn33xGp9IyQFqs4VrBmhwJBD6x90XITDR_pU
|
|
34
34
|
reconcile/gitlab_labeler.py,sha256=4xJHmVX155fclrHqkR926sL1GH6RTN5XfZ8PnqNXbRA,4534
|
35
35
|
reconcile/gitlab_members.py,sha256=MUIgYDLeJx2-_vMypyq2Pa17cpKdXATYhtVACS2ghpQ,8297
|
36
36
|
reconcile/gitlab_mr_sqs_consumer.py,sha256=O46mdziPgGOndbU-0_UJKJVUaiEoVzJPEgKm4_UvYoI,2571
|
37
|
-
reconcile/gitlab_owners.py,sha256=
|
37
|
+
reconcile/gitlab_owners.py,sha256=qDiCe5So5IaNOQl9i2kbUryzJKMFqEy5nRaEj2sGf6A,13938
|
38
38
|
reconcile/gitlab_permissions.py,sha256=gSGH6gAdJbPy5Z0rQGUqiNQSHty_tXQ_3Y4OQP_8nFs,8067
|
39
39
|
reconcile/gitlab_projects.py,sha256=K3tFf_aD1W4Ijp5q-9Qek3kwFGEWPcZ1kd7tzFJ4GyQ,1781
|
40
40
|
reconcile/integrations_manager.py,sha256=CY7cOj5dzt2se4IOg11VQvGQ-eTvLML5Q42Z9SSgeSk,9463
|
@@ -786,7 +786,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
786
786
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
|
787
787
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
788
788
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
789
|
-
qontract_reconcile-0.10.2.
|
790
|
-
qontract_reconcile-0.10.2.
|
791
|
-
qontract_reconcile-0.10.2.
|
792
|
-
qontract_reconcile-0.10.2.
|
789
|
+
qontract_reconcile-0.10.2.dev103.dist-info/METADATA,sha256=RaKLd8O3Dq4_Ru3Wk8xxxo37BDqOV9kCRcvV6yNtRDI,24566
|
790
|
+
qontract_reconcile-0.10.2.dev103.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
791
|
+
qontract_reconcile-0.10.2.dev103.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
792
|
+
qontract_reconcile-0.10.2.dev103.dist-info/RECORD,,
|
reconcile/gitlab_owners.py
CHANGED
@@ -94,6 +94,13 @@ class MRApproval:
|
|
94
94
|
lgtms.append(comment["username"])
|
95
95
|
return lgtms
|
96
96
|
|
97
|
+
def expand_groups(self, owners: list[str]) -> set[str]:
|
98
|
+
members: set[str] = set()
|
99
|
+
for name in owners:
|
100
|
+
if group := self.gitlab.get_group_if_exists(name):
|
101
|
+
members.update(m.username for m in self.gitlab.get_group_members(group))
|
102
|
+
return members.union(owners)
|
103
|
+
|
97
104
|
def get_approval_status(self):
|
98
105
|
approval_status = {"approved": False, "report": None}
|
99
106
|
|
@@ -117,6 +124,13 @@ class MRApproval:
|
|
117
124
|
if approver in lgtms:
|
118
125
|
change_approved = True
|
119
126
|
|
127
|
+
if (
|
128
|
+
not change_approved
|
129
|
+
and lgtms
|
130
|
+
and self.expand_groups(change_owners["approvers"]).intersection(lgtms)
|
131
|
+
):
|
132
|
+
change_approved = True
|
133
|
+
|
120
134
|
# Each change that was not yet approved will generate
|
121
135
|
# a report message
|
122
136
|
report[change_path] = {}
|
{qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev103.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|