gitlab_mr_check 1.4.1__tar.gz → 1.4.2__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.4.1
3
+ Version: 1.4.2
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>
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
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
32
  [![Build](https://img.shields.io/badge/build-passing-brightgreen)]()
33
- [![Coverage](https://img.shields.io/badge/coverage-0%25-red)](https://coverage.readthedocs.io/)
33
+ [![Coverage](https://img.shields.io/badge/coverage-35%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
@@ -15,7 +15,7 @@
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
17
  [![Build](https://img.shields.io/badge/build-passing-brightgreen)]()
18
- [![Coverage](https://img.shields.io/badge/coverage-0%25-red)](https://coverage.readthedocs.io/)
18
+ [![Coverage](https://img.shields.io/badge/coverage-35%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.4.1"
3
+ version = "1.4.2"
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 = 34
257
+ fail_under = 35
258
258
  exclude_lines = [
259
259
  "pragma: no cover",
260
260
  "if __name__ == .__main__.",
@@ -143,9 +143,9 @@ def get_mrs_by_project(project: gitlab.v4.objects.Project, filters: list[Any]) -
143
143
  return [mr for mr in project.mergerequests.list(all=True) if all(f(mr) for f in filters)]
144
144
 
145
145
 
146
- def get_mrs_by_projects(projects: list[Any], filters: list[Any]) -> dict[str, list[Any]]:
147
- """Return a mapping of project name to filtered MR list for each project."""
148
- return {project.name: get_mrs_by_project(project, filters) for project in projects}
146
+ def get_mrs_by_projects(projects: list[tuple[str, Any]], filters: list[Any]) -> dict[str, list[Any]]:
147
+ """Return a mapping of project name to filtered MR list for each (name, project) pair."""
148
+ return {name: get_mrs_by_project(project, filters) for name, project in projects}
149
149
 
150
150
 
151
151
  def evaluate_mrs_4eyes_per_project(project_mrs: dict[str, list[Any]]) -> list[ProjectMRAuditResult]:
@@ -194,7 +194,7 @@ def audit(url: str, token: str, config: Config) -> list[ProjectMRAuditResult]:
194
194
  LOGGER.info(' Group %s: %d project(s)', group.full_path, len(group_projects))
195
195
  for project in group_projects:
196
196
  LOGGER.info(' Project: %s', project.path_with_namespace)
197
- gl_projects.append(gl.projects.get(project.id, lazy=True))
197
+ gl_projects.append((project.path_with_namespace, gl.projects.get(project.id, lazy=True)))
198
198
  LOGGER.info('Found %d project(s)', len(gl_projects))
199
199
 
200
200
  LOGGER.info('Getting the merge requests under the projects')
File without changes