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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlab_mr_check
3
- Version: 1.3.0
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
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
30
30
  [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
31
31
  [![Changelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog%201.1.0-orange)](https://keepachangelog.com/en/1.1.0/)
32
- [![Build](https://img.shields.io/badge/build-unknown-lightgrey)]()
33
- [![Coverage](https://img.shields.io/badge/coverage-33%25-red)](https://coverage.readthedocs.io/)
32
+ [![Build](https://img.shields.io/badge/build-passing-brightgreen)]()
33
+ [![Coverage](https://img.shields.io/badge/coverage-34%25-red)](https://coverage.readthedocs.io/)
34
34
  [![pyscn quality](https://img.shields.io/badge/pyscn-not%20rated-lightgrey)](https://pyscn.ludo-tech.org)
35
35
 
36
36
  GitLab Merge Request 4-Eyes Approval Audit Tool
@@ -14,8 +14,8 @@
14
14
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
15
15
  [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
16
16
  [![Changelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog%201.1.0-orange)](https://keepachangelog.com/en/1.1.0/)
17
- [![Build](https://img.shields.io/badge/build-unknown-lightgrey)]()
18
- [![Coverage](https://img.shields.io/badge/coverage-33%25-red)](https://coverage.readthedocs.io/)
17
+ [![Build](https://img.shields.io/badge/build-passing-brightgreen)]()
18
+ [![Coverage](https://img.shields.io/badge/coverage-34%25-red)](https://coverage.readthedocs.io/)
19
19
  [![pyscn quality](https://img.shields.io/badge/pyscn-not%20rated-lightgrey)](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.0"
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 = 33
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(iid=mr.iid, passed=passed, reasoning=reasoning)
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