{"id":22070540,"url":"https://github.com/bconnorwhite/coveralls-api","last_synced_at":"2025-03-23T18:45:59.238Z","repository":{"id":57209962,"uuid":"298904142","full_name":"bconnorwhite/coveralls-api","owner":"bconnorwhite","description":"API client for coveralls.io","archived":false,"fork":false,"pushed_at":"2020-10-31T04:54:09.000Z","size":623,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T03:47:26.049Z","etag":null,"topics":["coveralls-api","lcov","stringify","typescript","typescript-definitions"],"latest_commit_sha":null,"homepage":"https://connorwhite.org/github/coveralls-api","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bconnorwhite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-26T21:42:02.000Z","updated_at":"2020-10-31T04:54:12.000Z","dependencies_parsed_at":"2022-08-29T11:50:33.920Z","dependency_job_id":null,"html_url":"https://github.com/bconnorwhite/coveralls-api","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bconnorwhite%2Fcoveralls-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bconnorwhite%2Fcoveralls-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bconnorwhite%2Fcoveralls-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bconnorwhite%2Fcoveralls-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bconnorwhite","download_url":"https://codeload.github.com/bconnorwhite/coveralls-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153274,"owners_count":20569400,"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":["coveralls-api","lcov","stringify","typescript","typescript-definitions"],"created_at":"2024-11-30T20:17:09.143Z","updated_at":"2025-03-23T18:45:59.214Z","avatar_url":"https://github.com/bconnorwhite.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003ecoveralls-api\u003c/h1\u003e\n  \u003ca href=\"https://npmjs.com/package/coveralls-api\"\u003e\n    \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/coveralls-api.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/bconnorwhite/coveralls-api\"\u003e\n    \u003cimg alt=\"typescript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/coveralls-api.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href='https://coveralls.io/github/bconnorwhite/coveralls-api?branch=master'\u003e\n    \u003cimg src='https://coveralls.io/repos/github/bconnorwhite/coveralls-api/badge.svg?branch=master' alt='Coverage Status' /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/bconnorwhite/coveralls-api\"\u003e\n    \u003cimg alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/coveralls-api?label=Stars%20Appreciated%21\u0026style=social\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/bconnorwhite\"\u003e\n    \u003cimg alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/bconnorwhite.svg?label=%40bconnorwhite\u0026style=social\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003e API client for [coveralls.io](https://coveralls.io/).\n\nTo use coveralls-api, you will need a personal token. Personal tokens can be created on the [Coveralls account page](https://coveralls.io/account).\n\nFull documentation:\n- Repos: https://coveralls.io/api/docs\n- Jobs: https://docs.coveralls.io/api-reference\n\n## Installation\n\n```bash\nyarn add coveralls-api\n```\n\n```bash\nnpm install coveralls-api\n```\n\n## API\n\n- [Create Repo](#create-repo)\n- [Get Repo](#get-repo)\n- [Update Repo](#update-repo)\n- [Post Job](#post-job)\n\n### Create Repo\n\n#### Usage\n\n```ts\nimport Coveralls from \"coveralls-api\";\n\nconst coveralls = new Coveralls(token);\n\ncoveralls.createRepo({\n  service: \"github\",\n  name: \"my-repo-name\"\n}).then((response) =\u003e {\n  // ...\n});\n```\n\n#### Types\n```ts\nfunction createRepo(args: CreateRepoArgs): Promise\u003cCreateRepoResponse | undefined\u003e;\n\ntype CreateRepoArgs = {\n  service: Service;\n  name: string;\n  comment_on_pull_requests?: boolean;\n  send_build_status?: boolean;\n  commit_status_fail_threshold?: number | null;\n  commit_status_fail_change_threshold?: number | null;\n}\n\ntype CreateRepoResponse = {\n  service: Service;\n  name: string;\n  comment_on_pull_requests?: boolean;\n  send_build_status?: boolean;\n  commit_status_fail_threshold?: number | null;\n  commit_status_fail_change_threshold?: number | null;\n  created_at: string;\n  updated_at: string;\n}\n\ntype Service = \"github\" | \"bitbucket\" | \"gitlab\" | \"stash\" | \"manual\";\n```\n\n### Get Repo\n\n#### Usage\n\n```ts\nimport Coveralls from \"coveralls-api\";\n\nconst coveralls = new Coveralls(token);\n\ncoveralls.getRepo(\"github\", \"my-github-user\", \"my-repo-name\").then((response) =\u003e {\n  // ...\n});\n```\n\n#### Types\n```ts\nfunction updateRepo(\n  service: Service,\n  user: string,\n  name: string\n): Promise\u003cGetRepoReponse | undefined\u003e\n\ntype GetRepoResponse = {\n  service: Service;\n  name: string;\n  comment_on_pull_requests?: boolean;\n  send_build_status?: boolean;\n  commit_status_fail_threshold?: number | null;\n  commit_status_fail_change_threshold?: number | null;\n  created_at: string;\n  updated_at: string;\n  id: number;\n  has_badge: boolean;\n  token?: string;\n}\n```\n\n### Update Repo\n\n#### Usage\n\n```ts\nimport Coveralls from \"coveralls-api\";\n\nconst coveralls = new Coveralls(token);\n\ncoveralls.updateRepo(\"github\", \"my-github-user\", \"my-repo-name\", {\n  comment_on_pull_requests: true,\n  send_build_status: false\n}).then((response) =\u003e {\n  // ...\n});\n```\n\n#### Types\n```ts\nfunction updateRepo(\n  service: Service,\n  user: string,\n  name: string,\n  args: UpdateRepoArgs\n): Promise\u003cUpdateRepoReponse | undefined\u003e\n\ntype UpdateRepoArgs = {\n  comment_on_pull_requests?: boolean;\n  send_build_status?: boolean;\n  commit_status_fail_threshold?: number | null;\n  commit_status_fail_change_threshold?: number | null;\n}\n\ntype UpdateRepoResponse = {\n  service: Service;\n  name: string;\n  comment_on_pull_requests?: boolean;\n  send_build_status?: boolean;\n  commit_status_fail_threshold?: number | null;\n  commit_status_fail_change_threshold?: number | null;\n  created_at: string;\n  updated_at: string;\n}\n```\n\n### Post Job\n\n#### Usage\n```ts\nimport Coveralls from \"coveralls-api\";\n\nconst coveralls = new Coveralls(token);\n\n// From LCOV file:\ncoveralls.postJob(\"github\", \"my-github-user\", \"my-repo-name\", {\n  lcov_path: \"coverage/lcov.info\"\n}).then((response) =\u003e {\n  // ...\n});\n\n// From source files:\ncoveralls.postJob(\"github\", \"my-github-user\", \"my-repo-name\", {\n  source_files: [{\n    name: ...\n  }, ...]\n}).then((response) =\u003e {\n  // ...\n});\n```\n\n#### Types\n```ts\nfunction postJob(service: Service, user: string, name: string, args: PostJobArgs | PostJobFromLCOVArgs): Promise\u003cPostJobResponse\u003e;\n\nexport type PostJobFromLCOVArgs = {\n  lcov_path: string;\n} \u0026 BaseJobArgs;\n\nexport type PostJobArgs = {\n  source_files: SourceFile[];\n} \u0026 BaseJobArgs;\n\nexport type SourceFile = {\n  name: string;\n  source_digest: string;\n  coverage: (number | null)[];\n  branches?: number[];\n  source?: string;\n}\n\ntype BaseJobArgs = {\n  service_name?: string;\n  service_number?: string;\n  service_job_id?: string;\n  service_pull_request?: string;\n  parallel?: boolean;\n  flag_name?: string;\n  git?: {\n    head?: {\n      id?: string;\n      committer_name?: string;\n      committer_email?: string;\n      message?: string;\n      author_name?: string;\n      author_email?: string;\n    };\n    branch?: string;\n    remotes?: {\n      name?: string;\n      url?: string;\n    }[];\n  };\n  commit_sha?: string;\n  run_at?: Date | string;\n}\n```\n\n\u003cbr /\u003e\n\n\u003ch2\u003eDependencies\u003cimg align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/david/bconnorwhite/coveralls-api.svg\"\u003e\u003c/h2\u003e\n\n- [@bconnorwhite/exec](https://www.npmjs.com/package/@bconnorwhite/exec): Execute commands while keeping flags easily configurable as an object\n- [cross-fetch-json](https://www.npmjs.com/package/cross-fetch-json): Universal fetch API that only returns JSON\n- [form-data](https://www.npmjs.com/package/form-data): A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.\n- [md5](https://www.npmjs.com/package/md5): Js function for hashing messages with MD5\n- [parse-json-object](https://www.npmjs.com/package/parse-json-object): Parse a typed JSON object\n- [read-file-safe](https://www.npmjs.com/package/read-file-safe): Read files without try catch.\n- [read-lcov-safe](https://www.npmjs.com/package/read-lcov-safe): Read and parse an lcov file without try catch\n- [stringify-json-object](https://www.npmjs.com/package/stringify-json-object): Stringify and format a JSON object.\n\n\u003cbr /\u003e\n\n\u003ch2\u003eDev Dependencies\u003cimg align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/coveralls-api.svg\"\u003e\u003c/h2\u003e\n\n- [@bconnorwhite/bob](https://www.npmjs.com/package/@bconnorwhite/bob): Bob is a toolkit for TypeScript projects\n- [@types/md5](https://www.npmjs.com/package/@types/md5): TypeScript definitions for md5\n- [@types/node](https://www.npmjs.com/package/@types/node): TypeScript definitions for Node.js\n- [dotenv](https://www.npmjs.com/package/dotenv): Loads environment variables from .env file\n\n\u003cbr /\u003e\n\n\u003ch2\u003eLicense \u003cimg align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/coveralls-api.svg\"\u003e\u003c/h2\u003e\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbconnorwhite%2Fcoveralls-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbconnorwhite%2Fcoveralls-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbconnorwhite%2Fcoveralls-api/lists"}