Skip to content
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 badges for private repos #1495

Open
vineyardbovines opened this issue Feb 12, 2018 · 4 comments
Open

CodeClimate badges for private repos #1495

vineyardbovines opened this issue Feb 12, 2018 · 4 comments
Labels
good first issue New contributors, join in! self-hosting Discussion, problems, features, and documentation related to self-hosting Shields service-badge New or updated service badge

Comments

@vineyardbovines
Copy link

Thanks for the great work all.

Has anyone has been able to get shields' CodeClimate badges working for private repos? I've tried a couple different ways to config the URL, but none work. I know CC has their own badges, but I'm not a fan of them and want all the badges I have to match, style-wise.

@PyvesB
Copy link
Member

PyvesB commented Feb 12, 2018

Hello @gretzky ,

Even though I have never actually used CodeClimate, I recently rewrote all the badges relating to this service (see #1387 and #1368), so I may be able to shed some light on the issue and possibly work on a solution. The API documentation mentions that a token should be provided for authenticated calls. I'm guessing that doing so would probably allow to retrieve the relevant data from private repositories. With the current implementation, Shield's CodeClimate badges do not support providing a token, hence why all your attempts have failed so far.

Some other services such as CircleCI or CodeCov seem to have an optional token parameter that can be inserted in the badge's URL, I'm guessing we could add similar support for CodeClimate. We would need to have a look at what CodeClimate's token model is and how finely you can tune the token settings, as we wouldn't want sensitive information to be accessible by anyone looking at the badge's URL. 😉

Cheers,

Pyves

@vineyardbovines
Copy link
Author

Hey @PyvesB, thanks for the response. I found the CircleCI implementation, which is what I started digging into. I'd be happy to do some more further digging-- I'll make a fork and see if I can pull anything off.

@RedSparr0w RedSparr0w added the service-badge New or updated service badge label Feb 26, 2018
@paulmelnikow
Copy link
Member

Passing secrets to the shields server is not a great idea. While we try to keep things secure, we don't guarantee it, and would like not to put other people's data at risk. The circle handling is an anomaly. Is is possible we could accomplish this use case through self-hosting, as we do for github?

@paulmelnikow paulmelnikow added good first issue New contributors, join in! self-hosting Discussion, problems, features, and documentation related to self-hosting Shields labels Jan 6, 2019
@paulmelnikow
Copy link
Member

The codeclimate badge still needs to be refactored, though we've got a good pattern in place for secrets config now, so once that is done, it should be fairly easy to add support for this in self-hosted environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! self-hosting Discussion, problems, features, and documentation related to self-hosting Shields service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

4 participants