{"id":13769289,"url":"https://github.com/hipstersmoothie/jest-github-reporter","last_synced_at":"2025-04-12T11:49:22.777Z","repository":{"id":40240475,"uuid":"202984528","full_name":"hipstersmoothie/jest-github-reporter","owner":"hipstersmoothie","description":"Report jest test errors directly in pull requests","archived":false,"fork":false,"pushed_at":"2025-03-31T18:52:32.000Z","size":922,"stargazers_count":106,"open_issues_count":23,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T13:15:44.636Z","etag":null,"topics":["github","github-checks","github-checks-api","jest","jest-reporter","jest-result-processor"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/hipstersmoothie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-18T09:36:38.000Z","updated_at":"2025-03-05T19:53:41.000Z","dependencies_parsed_at":"2023-09-26T01:44:36.332Z","dependency_job_id":"d6b34493-3c83-4722-8687-d9ef1243440f","html_url":"https://github.com/hipstersmoothie/jest-github-reporter","commit_stats":{"total_commits":171,"total_committers":9,"mean_commits":19.0,"dds":0.5087719298245614,"last_synced_commit":"7a380afe8c9b3b604d1ddbc9338d3d51d65fdcfd"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipstersmoothie%2Fjest-github-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipstersmoothie%2Fjest-github-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipstersmoothie%2Fjest-github-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipstersmoothie%2Fjest-github-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hipstersmoothie","download_url":"https://codeload.github.com/hipstersmoothie/jest-github-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248564847,"owners_count":21125412,"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":["github","github-checks","github-checks-api","jest","jest-reporter","jest-result-processor"],"created_at":"2024-08-03T17:00:21.182Z","updated_at":"2025-04-12T11:49:22.753Z","avatar_url":"https://github.com/hipstersmoothie.png","language":"TypeScript","funding_links":[],"categories":["Packages"],"sub_categories":["Reporters"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg  height=\"200\"\n    src=\"./logo.jpg\"\u003e\n  \u003ch1\u003ejest-github-reporter\u003c/h1\u003e\n  \u003cp\u003eSee jest test errors directly in pull requests\u003c/p\u003e\n\u003c/div\u003e\n\n## Highlights\n\n- Report your jest results as annotations using the [GitHub Checks API](https://developer.github.com/v3/checks/)\n- Only runs in CI environment\n\n![Example of annotations being included in a pull request](./example.png)\n\n## Install\n\n```sh\nnpm install --save-dev jest-github-reporter\n# or\nyarn add -D jest-github-reporter\n```\n\n## Usage\n\nYou will need to install [the github app](https://github.com/apps/jest-results) to your repo.\n\nThen just run jest and it will test errors PRs!\n\n```json\n{\n  \"reporters\": [\"default\", \"jest-github-reporter\"]\n}\n```\n\n```sh\njest --testLocationInResults file.js\n```\n\n(The `--testLocationInResults` flag is needed to get the in-file checks/annotations, otherwise only the summary comment is shown.)\n\n## Using your own GitHub App\n\nYou might not want to use our github app for the formatter.\n\nReasons:\n\n1. You think they way we exposed the keys is bad\n2. You are on Github Enterprise and cannot use the public app\n\nIn these situations all you need to do is create a GitHub app and set a few environment variables.\n\n### 1. Create a GitHub app\n\nGo to [this page](https://github.com/settings/apps) to create a new GitHub app. You need to set the following fields:\n\n- `name` - The name that shows for your app in the checks reports\n- `Homepage URL` - You can set this to anything. Ours is set to `https://github.com`\n- `Webhook URL` - You can set this to anything. Ours is set to `https://github.com`\n\nThen hit `Save Changes` and you're all done setting up your GitHub app.\n\n### 2. Set `JEST_APP_ID` environment variable\n\nYour GitHub application's ID. This can be found at the top of your GitHub app's edit page.\n\n### 3. Set `JEST_PRIVATE_KEY` environment variable\n\nThe private RSA key for your application. The prompt to generate the RSA key is at the bottom of your GitHub app's edit page.\n\nOnce you have generated a key, open the file that is downloaded and copy to text into the `PRIVATE_KEY` environment variable.\n\n### 4. Set `GH_API` (enterprise only)\n\nTo get this package to work on github enterprise instances you will need to set the `GH_API` environment variable to a url pointing towards your enterprise GitHub's API.\n\nIf you need specific preview apis for your enterprise server, you can set the `GH_PREVIEWS` environment variable.\n\nExample:\n\n```\nGH_PREVIEWS=eye-scream-preview,machine-man-preview\n```\n\n### 5. (optional) Set `GH_CHECK_NAME`\n\nIf the default check name conflicts with something, you can override it by passing `GH_CHECK_NAME` environment variable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhipstersmoothie%2Fjest-github-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhipstersmoothie%2Fjest-github-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhipstersmoothie%2Fjest-github-reporter/lists"}