Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Code Climate services

License

NotificationsYou must be signed in to change notification settings

codeclimate/codeclimate-services

Repository files navigation

Code ClimateTest Coverage

A collection of classes, each responsible for integrating one external servicewith the Code Climate system.

Overview

Services define#receive_<event> methods for any events they are interestedin. These methods will be invoked with@payload set to a hash of data aboutthe event being handled.

The structure of this data is described below. Note that there may be additionalkeys not listed here.

Events

Attributes common to all event types:

{"repo_name":String,"details_url":String}

Coverage

Event name:coverage

Event-specific attributes:

{"covered_percent":Float,"previous_covered_percent":Float,"covered_percent_delta":Float,"compare_url":String}

Quality

Event name:quality

Event-specific attributes:

{"constant_name":String,"rating":String,// "A", "B", "C", etc"previous_rating":String,"remediation_cost":Float,"previous_remediation_cost":Float,"compare_url":String}

Vulnerability

Event name:vulnerability

Event-specific attributes:

{"warning_type":String,"vulnerabilities":[{"warning_type":String,"location":String},{// ...}]}

Note: The reason for the top-levelwarning_type attribute is for when thelist of vulnerabilities are of mixed warning types. In this case, the top-levelattribute can be used in any messaging.

Pull Request

Event name:pull_request

Event-specific attributes:

{"state":String,// "pending", or "success""github_slug":String,// user/repo"number":String,"commit_sha":String,}

Pull Request Coverage

Event name:pull_request_coverage

Event-specific attributes:

{"state":String,// "pending", "success", or "failure""github_slug":String,// user/repo"number":String,"commit_sha":String,"covered_percent_delta":Float,}

Other Events

The following are not fully implemented yet.

  • snapshot

Contributing

To add a new integration, you'll need to create a newService subclass. Pleaseuse existing services as an example:

Ensure that your class implements#receive_test. It must handle any exceptionsand always return a hash of{ ok: true|false, message: "String (HTML ok)" }.Example.

When you open your PR, please include an image for your service.

Release

  1. Bump the version onlib/cc/services/version
  2. A gem owner developer should run the following: (check owners herehttps://rubygems.org/gems/codeclimate-services)
bundle installgem build codeclimate-services.gemspecgem push codeclimate-services-<VERSION>.gemgit tag v<VERSION>git push origin master --tags

License

See LICENSE.txt. This incorporates code from bugsnag-notification-plugins andgithub-services, both MIT licensed.

About

Code Climate services

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors28


[8]ページ先頭

©2009-2025 Movatter.jp