https://github.com/yetibot/yetibot-codeclimate
:rocket: Yetibot plugin for CodeClimate integration
https://github.com/yetibot/yetibot-codeclimate
codeclimate webhook yetibot
Last synced: about 1 month ago
JSON representation
:rocket: Yetibot plugin for CodeClimate integration
- Host: GitHub
- URL: https://github.com/yetibot/yetibot-codeclimate
- Owner: yetibot
- License: epl-1.0
- Created: 2016-01-27T21:27:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-09T22:14:57.000Z (almost 10 years ago)
- Last Synced: 2025-02-16T21:41:38.062Z (11 months ago)
- Topics: codeclimate, webhook, yetibot
- Language: Clojure
- Homepage:
- Size: 39.1 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# yetibot-codeclimate
[](https://clojars.org/yetibot-codeclimate)
A Yetibot plugin to integrate with CodeClimate. **Requires Docker on the host.**
- [Official engines](https://docs.codeclimate.com/docs/list-of-engines)
- [Community engines](https://github.com/codeclimate-community)
If a CodeClimate Engine does not yet exist for your language, you can contribute
your own; [it's quite easy](http://blog.codeclimate.com/blog/2015/07/07/build-your-own-codeclimate-engine/).

## Roadmap
- [ ] Let Yetibot setup the webhook for you via a command
## Usage
0. Add yetibot-codeclimate dependency to your Yetibot install.
0. Create a webhook in GitHub's repository settings to point to your Yetibot. At
a minimum, send all `push` events, or just send Everything. Yetibot
CodeClimate only listens to the events it needs. The webhook url should be:
```
http://$YOUR_YETIBOT:3000/codeclimate/webhook
```
0. Make sure your Yetibot is
[configured](https://github.com/devth/yetibot/blob/33803bdf159c33fcfbfb55dd13a74963163a3fee/config/config-sample.edn#L49-L53)
with a GitHub token of an account that has access to your repo.
## Config
**workspace-path**: You can optionally set a workspace path. This is where
Yetibot will checkout repos to run CodeClimate analysis on. It's important to
note that if you're using Docker Machine, this location must be inside your
Users directory (on OSX). If not set, it defaults to "/tmp/cc", which works on
Linux where you don't need Docker Machine.
**results-path**: You can optionally set a path were linting results will be
stored. The default is "./codeclimate/". Yetibot serves results from JSON files
stored in this directory.
```edn
;; merge this into config/config.edn in your yetibot installation
{:yetibot-codeclimate
{:workspace-path "/Users/foo/tmp"
:results-path "./codeclimate"}}
```
Make sure to set Yetibot's `:url` configuration. Yetibot CodeClimate uses this
to post the correct target_url on each commit it analyzes, which GitHub exposes
in their UI.
If you are using Docker Machine, you also must configure Yetibot's Docker
settings so CodeClimate uses the correct Docker Machine vars:
```edn
;; merge this into config/config.edn in your yetibot installation
{:yetibot
{:url "http://YOUR_YETIBOT:3000"
:docker
{:machine {:DOCKER_TLS_VERIFY "1"
:DOCKER_HOST "tcp://1.2.3.4:2376"
:DOCKER_CERT_PATH "/Users/foo/.docker/machine/machines/default"
:DOCKER_MACHINE_NAME "default"}}}}
```
Find these settings using `docker-machine env default` where `default` is the
name of your Docker Machine (use `docker-machine ls` to list them if you don't
know the name).
## License
Copyright © 2016 Trevor C. Hartman
Distributed under the Eclipse Public License either version 1.0 or any later
version.