Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit fdf89c3

Browse files
committed
Merge pull request #28 from codeclimate/pb-oss-prep
Begin OSS prep work
2 parents c917307 + 6860719 commit fdf89c3

File tree

2 files changed

+33
-73
lines changed

2 files changed

+33
-73
lines changed

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Code Climate Services
22

3+
A collection of classes, each responsible for integrating one external service
4+
with the Code Climate system.
5+
6+
## Overview
7+
8+
Services define `#receive_<event>` methods for any events they are interested
9+
in. These methods will be invoked with `@payload` set to a hash of data about
10+
the event being handled.
11+
12+
The structure of this data is described below. Note that there may be additional
13+
keys not listed here.
14+
315
## Events
416

517
Attributes common to all event types:
@@ -61,6 +73,10 @@ Event-specific attributes:
6173
}
6274
```
6375

76+
*Note*: The reason for the top-level `warning_type` attribute is for when the
77+
list of vulnerabilities are of mixed warning types. In this case, the top-level
78+
attribute can be used in any messaging.
79+
6480
### Pull Request
6581

6682
Event name: `pull_request`
@@ -80,9 +96,23 @@ Event-specific attributes:
8096

8197
The following are not fully implemented yet.
8298

83-
* :issue
84-
* :unit
85-
* :snapshot
99+
* `snapshot`
100+
101+
## Contributing
102+
103+
To add a new integration, you'll need to create a new `Service` subclass. Please
104+
use existing services as an example:
105+
106+
- Chat service examples: `hipchat`, `campfire`
107+
- Issue tracker examples: `github_issues`, `lighthouse`
108+
109+
Ensure that your class implements `#receive_test`. It must handle any exceptions
110+
and always return a hash of `{ ok: true|false, message: "String (HTML ok)" }`.
111+
112+
When you open your PR, please include an image for your service.
113+
[Example][service_avatar].
114+
115+
[service_avatar]: https://codeclimate.com/assets/integration_icons/campfire-9f0475f77133a3ff5267972436dead60.png
86116

87117
## License
88118

lib/cc/services/trello.rb

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)