gitlab_mr_check 1.3.0__tar.gz → 1.4.0__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.
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/PKG-INFO +3 -3
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/README.md +2 -2
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/pyproject.toml +2 -2
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/src/gitlab_mr_check/gitlab_mr_check.py +15 -1
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/LICENSE +0 -0
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/src/gitlab_mr_check/__init__.py +0 -0
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/src/gitlab_mr_check/cli.py +0 -0
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/src/gitlab_mr_check/helpers/__init__.py +0 -0
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/src/gitlab_mr_check/helpers/config.py +0 -0
- {gitlab_mr_check-1.3.0 → gitlab_mr_check-1.4.0}/src/gitlab_mr_check/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitlab_mr_check
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: GitLab Merge Request 4-Eyes Approval Audit Tool
|
|
5
5
|
Author: Yorick Hoorneman
|
|
6
6
|
Author-email: Yorick Hoorneman <yhoorneman@schubergphilis.com>
|
|
@@ -29,8 +29,8 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
[](https://github.com/pre-commit/pre-commit)
|
|
30
30
|
[](https://conventionalcommits.org)
|
|
31
31
|
[](https://keepachangelog.com/en/1.1.0/)
|
|
32
|
-
[]()
|
|
33
|
+
[](https://coverage.readthedocs.io/)
|
|
34
34
|
[](https://pyscn.ludo-tech.org)
|
|
35
35
|
|
|
36
36
|
GitLab Merge Request 4-Eyes Approval Audit Tool
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
[](https://github.com/pre-commit/pre-commit)
|
|
15
15
|
[](https://conventionalcommits.org)
|
|
16
16
|
[](https://keepachangelog.com/en/1.1.0/)
|
|
17
|
-
[]()
|
|
18
|
+
[](https://coverage.readthedocs.io/)
|
|
19
19
|
[](https://pyscn.ludo-tech.org)
|
|
20
20
|
|
|
21
21
|
GitLab Merge Request 4-Eyes Approval Audit Tool
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "gitlab_mr_check"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.4.0"
|
|
4
4
|
description = "GitLab Merge Request 4-Eyes Approval Audit Tool"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -254,7 +254,7 @@ branch = true
|
|
|
254
254
|
[tool.coverage.report]
|
|
255
255
|
show_missing = true
|
|
256
256
|
skip_covered = true
|
|
257
|
-
fail_under =
|
|
257
|
+
fail_under = 34
|
|
258
258
|
exclude_lines = [
|
|
259
259
|
"pragma: no cover",
|
|
260
260
|
"if __name__ == .__main__.",
|
|
@@ -48,6 +48,11 @@ class MRApprovalResult:
|
|
|
48
48
|
iid: int
|
|
49
49
|
passed: bool
|
|
50
50
|
reasoning: str
|
|
51
|
+
title: str = ''
|
|
52
|
+
web_url: str = ''
|
|
53
|
+
state: str = ''
|
|
54
|
+
created_at: str = ''
|
|
55
|
+
updated_at: str = ''
|
|
51
56
|
|
|
52
57
|
|
|
53
58
|
@dataclass
|
|
@@ -111,7 +116,16 @@ def has_4eyes_approval(mr: gitlab.v4.objects.ProjectMergeRequest) -> MRApprovalR
|
|
|
111
116
|
approvers = {user['user']['username'] for user in approved_by}
|
|
112
117
|
passed = bool(approvers - {author})
|
|
113
118
|
reasoning = f'MR !{mr.iid} by {author} approved by {", ".join(approvers)} - 4-eyes approval: {passed}'
|
|
114
|
-
return MRApprovalResult(
|
|
119
|
+
return MRApprovalResult(
|
|
120
|
+
iid=mr.iid,
|
|
121
|
+
passed=passed,
|
|
122
|
+
reasoning=reasoning,
|
|
123
|
+
title=mr.title,
|
|
124
|
+
web_url=mr.web_url,
|
|
125
|
+
state=mr.state,
|
|
126
|
+
created_at=mr.created_at,
|
|
127
|
+
updated_at=mr.updated_at,
|
|
128
|
+
)
|
|
115
129
|
|
|
116
130
|
|
|
117
131
|
def mr_is_merged(mr: gitlab.v4.objects.ProjectMergeRequest) -> bool:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|