kiwicom / the-zoo

🐒 A service registry for humans
MIT License
93 stars 6 forks source link

Add repository project details #364

Closed batisteo closed 3 years ago

batisteo commented 3 years ago

This add the integration of Gitlab SW-709 to the Service overview page in Hangar.

This merge request includes:

lgtm-com[bot] commented 3 years ago

This pull request introduces 1 alert when merging aeb818796eed154c3e58f24a3cf5d638934caba4 into d8f041dba982617eb967df9e465a1acb085382a5 - view on LGTM.com

new alerts:

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.02%.

Quality metrics Before After Change
Complexity 0.90 ⭐ 0.86 ⭐ -0.04 👍
Method Length 40.76 ⭐ 48.25 ⭐ 7.49 👎
Working memory 9.55 🙂 12.32 😞 2.77 👎
Quality 77.45% 77.47% 0.02% 👍
Other metrics Before After Change
Lines 1480 2191 711
Changed files Quality Before Quality After Quality Change
test/conftest.py 81.83% ⭐ 81.06% ⭐ -0.77% 👎
test/api/query/test_repositories.py 93.83% ⭐ 92.34% ⭐ -1.49% 👎
test/api/query/snapshots/snap_test_repositories.py 62.61% 🙂 33.34% 😞 -29.27% 👎
test/repos/test_gitlab.py 73.35% 🙂 84.00% ⭐ 10.65% 👍
test/repos/test_utils.py 71.68% 🙂 73.44% 🙂 1.76% 👍
zoo/factories.py 51.49% 🙂 49.80% 😞 -1.69% 👎
zoo/api/types.py 84.88% ⭐ 85.16% ⭐ 0.28% 👍
zoo/repos/github.py 73.23% 🙂 72.88% 🙂 -0.35% 👎
zoo/repos/gitlab.py 81.11% ⭐ 81.18% ⭐ 0.07% 👍
zoo/repos/models.py 91.99% ⭐ 91.83% ⭐ -0.16% 👎
zoo/repos/urls.py 82.63% ⭐ 90.82% ⭐ 8.19% 👍
zoo/repos/views.py 90.78% ⭐ 99.83% ⭐ 9.05% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
zoo/repos/github.py get_project.download_archive.get_project_details.create_remote_commit.create_merge_request._create_new_tree 8 ⭐ 144 😞 11 😞 53.82% 🙂 Try splitting into smaller methods. Extract out complex expressions
zoo/api/types.py SentryIssue.resolve_histogram 0 ⭐ 89 🙂 18 ⛔ 59.69% 🙂 Extract out complex expressions
zoo/repos/github.py get_project.download_archive.get_project_details 0 ⭐ 56 ⭐ 30 ⛔ 60.01% 🙂 Extract out complex expressions
zoo/repos/gitlab.py get_project.download_archive.get_repositories.get_project_details 0 ⭐ 57 ⭐ 27 ⛔ 60.38% 🙂 Extract out complex expressions
zoo/repos/gitlab.py get_project.download_archive.get_repositories 3 ⭐ 61 ⭐ 18 ⛔ 60.90% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

91.3% 91.3% Coverage
0.0% 0.0% Duplication

ghost commented 3 years ago

DeepCode failed to analyze this pull request

Something went wrong despite trying multiple times, sorry about that. Please comment this pull request with "Retry DeepCode" to manually retry, or contact us so that a human can look into the issue.