-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CodeClimate] Fix remaining badges #1387
Conversation
Generated by 🚫 dangerJS |
Yeah i get where you are coming from,
Not sure what to do about the You may be able to merge them all/remove some of the duplication with a |
I haven't dived into this too closely, though I could offer some quick thoughts on the API design:
|
In terms of keeping backwards compatibility for the base
From what i can gather, the It does look like percentage may be the main scoring format for coverage though:
Now that you mention it, when looking through the current badges, dashes do seem to be commonly used, specifically quite a lot in GitHub badges.
Maybe a symbol at the end or logo at the beginning for soon to be depreciated badges, |
Everything is looking good so far. Not sure what should be done about the And as the codes already there add tech debt as a new option Any thoughts @paulmelnikow ? |
Thanks for all your work on this, 🎉 Merged! |
Glad this got merged, it was a non trivial piece of work! Hopefully the new Code Climate badges won't break any time soon! 😃 |
This is great, thanks @PyvesB and @RedSparr0w! This may be a silly question, but how long does it usually take for these type of changes to hit production? |
Hi @timkurvers, I will quote @paulmelnikow on that:
|
@PyvesB after 435903a service tests of codeclimate crashes. CI https://circleci.com/gh/badges/shields/1880, locally I have similar result
|
@platan: The tests are running fine on the branch. This pull request was submitted back in December, so it's probably another pull request that got merged in the meantime that indirectly broke them. I'll have a look into the issue this week-end. 😉 |
You spotted source of the problem quite fast. |
Hello there,
This pull request is related to discussions in #1368 and #1329. @RedSparr0w would probably be the ideal person to review this as he has been involved in the discussions and the previous pull request. 😉
We should now have five functional Code Climate badges, with tests:
/codeclimate/c
: coverage score (letter)./codeclimate/coverage
: coverage percentage./codeclimate
: technical debt percentage (related to the maintainability of the project)./codeclimate/maintainability
: maintainability score (letter)./codeclimate/issues
: number of issues.Nevertheless, I'm still unhappy with the current state of our code for several reasons:
/codeclimate/coverage
and/codeclimate/c
is confusing for both users and developers. One is a percentage, the other is just a letter related to the percentage./codeclimate/coverage_score
and/codeclimate/coverage_percentage
would have been more consistent in my opinion./codeclimate/maintainability
is just a letter related to the percentage. The two URLs should be along the lines of/codeclimate/maintainability_score
and/codeclimate/maintainability_percentage
. Previously/codeclimate
probably corresponded to the global GPA metric, which was deprecated in favour of two top-level ratings, maintainability and test coverage (see blog post). In addition to the naming inconsistency, we have something that looks top-level, but actually isn't.Unfortunately, I don't see how to resolve these problems without impacting users of the existing badge URLs. My approach in this PR was to match the 5 existing shields URLs to metrics that seemed to reflect as closely as possible the old badges, and make sure we have tests for all badges.
As a side note, there is a bit of code duplication in server.js (~15-20 lines), as both the badges who call the
snapshots
andtest_reports
endpoints have to make the same first call to therepos
parent endpoint. Merging the two was too messy, so I broke things down and hope that we can get rid of the code duplication nicely once we have neat separate services.Cheers,
Pyves