{"id":19882184,"url":"https://github.com/codeclimate/codeclimate-services","last_synced_at":"2025-05-02T14:31:50.046Z","repository":{"id":11898938,"uuid":"14462314","full_name":"codeclimate/codeclimate-services","owner":"codeclimate","description":"Code Climate services","archived":false,"fork":false,"pushed_at":"2022-07-07T17:57:27.000Z","size":560,"stargazers_count":13,"open_issues_count":1,"forks_count":9,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-04-15T01:47:56.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeclimate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-17T06:22:37.000Z","updated_at":"2022-06-10T14:11:41.000Z","dependencies_parsed_at":"2022-06-29T18:02:25.353Z","dependency_job_id":null,"html_url":"https://github.com/codeclimate/codeclimate-services","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fcodeclimate-services","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fcodeclimate-services/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fcodeclimate-services/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeclimate%2Fcodeclimate-services/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeclimate","download_url":"https://codeload.github.com/codeclimate/codeclimate-services/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315108,"owners_count":17290992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T17:16:37.476Z","updated_at":"2024-11-12T17:16:38.089Z","avatar_url":"https://github.com/codeclimate.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Climate Services\n\n[![Code Climate](https://codeclimate.com/github/codeclimate/codeclimate-services/badges/gpa.svg)](https://codeclimate.com/github/codeclimate/codeclimate-services)\n[![Test Coverage](https://codeclimate.com/github/codeclimate/codeclimate-services/badges/coverage.svg)](https://codeclimate.com/github/codeclimate/codeclimate-services)\n\nA collection of classes, each responsible for integrating one external service\nwith the Code Climate system.\n\n## Overview\n\nServices define `#receive_\u003cevent\u003e` methods for any events they are interested\nin. These methods will be invoked with `@payload` set to a hash of data about\nthe event being handled.\n\nThe structure of this data is described below. Note that there may be additional\nkeys not listed here.\n\n## Events\n\nAttributes common to all event types:\n\n```javascript\n{\n  \"repo_name\": String,\n  \"details_url\": String\n}\n```\n\n### Coverage\n\nEvent name: `coverage`\n\nEvent-specific attributes:\n\n```javascript\n{\n  \"covered_percent\": Float,\n  \"previous_covered_percent\": Float,\n  \"covered_percent_delta\": Float,\n  \"compare_url\": String\n}\n```\n\n### Quality\n\nEvent name: `quality`\n\nEvent-specific attributes:\n\n```javascript\n{\n  \"constant_name\": String,\n  \"rating\": String, // \"A\", \"B\", \"C\", etc\n  \"previous_rating\": String,\n  \"remediation_cost\": Float,\n  \"previous_remediation_cost\": Float,\n  \"compare_url\": String\n}\n```\n\n### Vulnerability\n\nEvent name: `vulnerability`\n\nEvent-specific attributes:\n\n```javascript\n{\n  \"warning_type\": String,\n  \"vulnerabilities\": [{\n    \"warning_type\": String,\n    \"location\": String\n  }, {\n    // ...\n  }]\n}\n```\n\n*Note*: The reason for the top-level `warning_type` attribute is for when the\nlist of vulnerabilities are of mixed warning types. In this case, the top-level\nattribute can be used in any messaging.\n\n### Pull Request\n\nEvent name: `pull_request`\n\nEvent-specific attributes:\n\n```javascript\n{\n  \"state\": String, // \"pending\", or \"success\"\n  \"github_slug\": String, // user/repo\n  \"number\": String,\n  \"commit_sha\": String,\n}\n```\n\n### Pull Request Coverage\n\nEvent name: `pull_request_coverage`\n\nEvent-specific attributes:\n\n```javascript\n{\n  \"state\": String, // \"pending\", \"success\", or \"failure\"\n  \"github_slug\": String, // user/repo\n  \"number\": String,\n  \"commit_sha\": String,\n  \"covered_percent_delta\": Float,\n}\n```\n\n## Other Events\n\nThe following are not fully implemented yet.\n\n* `snapshot`\n\n## Contributing\n\nTo add a new integration, you'll need to create a new `Service` subclass. Please\nuse existing services as an example:\n\n- Chat service examples: [hipchat](lib/cc/services/hipchat.rb), [campfire](lib/cc/services/campfire.rb)\n- Issue tracker examples: [github_issues](lib/cc/services/github_issues.rb), [lighthouse](lib/cc/services/lighthouse.rb)\n\nEnsure that your class implements `#receive_test`. It must handle any exceptions\nand always return a hash of `{ ok: true|false, message: \"String (HTML ok)\" }`.\n[Example](lib/cc/services/jira.rb#L31).\n\nWhen you open your PR, please include an image for your service.\n\n## Release\n\n1. Bump the version on `lib/cc/services/version`\n2. A gem owner developer should run the following: (check owners here https://rubygems.org/gems/codeclimate-services)\n```shell\nbundle install\ngem build codeclimate-services.gemspec\ngem push codeclimate-services-\u003cVERSION\u003e.gem\ngit tag v\u003cVERSION\u003e\ngit push origin master --tags\n```\n\n## License\n\nSee LICENSE.txt. This incorporates code from bugsnag-notification-plugins and\ngithub-services, both MIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeclimate%2Fcodeclimate-services","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeclimate%2Fcodeclimate-services","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeclimate%2Fcodeclimate-services/lists"}