{"id":26552746,"url":"https://github.com/codex-/knip-reporter","last_synced_at":"2025-03-22T08:49:26.591Z","repository":{"id":199621465,"uuid":"702283617","full_name":"Codex-/knip-reporter","owner":"Codex-","description":"⚙️📄 Report the results from knip on pull requests","archived":false,"fork":false,"pushed_at":"2025-03-12T07:07:31.000Z","size":1871,"stargazers_count":9,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-12T08:21:01.700Z","etag":null,"topics":[],"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/Codex-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"ko_fi":"codex0","open_collective":"codex-nz"}},"created_at":"2023-10-09T02:24:04.000Z","updated_at":"2025-03-12T07:07:34.000Z","dependencies_parsed_at":"2023-10-23T23:22:59.066Z","dependency_job_id":"140a5a3e-2b9c-4e61-ad43-b50b398228cf","html_url":"https://github.com/Codex-/knip-reporter","commit_stats":null,"previous_names":["codex-/knip-reporter"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codex-%2Fknip-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codex-%2Fknip-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codex-%2Fknip-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codex-%2Fknip-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codex-","download_url":"https://codeload.github.com/Codex-/knip-reporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931591,"owners_count":20534011,"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":"2025-03-22T08:49:26.163Z","updated_at":"2025-03-22T08:49:26.585Z","avatar_url":"https://github.com/Codex-.png","language":"TypeScript","funding_links":["https://ko-fi.com/codex0","https://opencollective.com/codex-nz"],"categories":[],"sub_categories":[],"readme":"# GitHub Action: knip-reporter\n\n\u003e ⚙️📄 Report the results from [knip](https://github.com/webpro/knip) on pull requests.\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/codex-/knip-reporter/ci.yml?style=flat-square)](https://github.com/Codex-/knip-reporter/actions/workflows/ci.yml) [![GitHub Marketplace](https://img.shields.io/badge/Marketplace-knip–reporter-blue?style=flat-square\u0026logo=github\u0026link=https%3A%2F%2Fgithub.com%2Fmarketplace%2Factions%2Fawait-remote-run)](https://github.com/marketplace/actions/knip-reporter)\n\nThis action runs [knip](https://github.com/webpro/knip), parses the results, and posts the report as comments on the related pull request.\n\n## Usage\n\nThe execution of `knip` requires you to have followed the general `knip` setup and have a command script present in your `package.json` file, `knip`, by default but this can be of any name. If this script name deviates from the standard `knip` setup, please provide the script name in the config.\n\n`knip-reporter` appends a reporter to the `knip` command used, `--reporter json`, to output a parseable report with information needed for annotations where supported.\n\n```yaml\nname: Pull Request\non:\n  pull_request:\n\n# This permissions config is only required if you are\n# not providing own permissive token\npermissions:\n  checks: write\n  issues: write\n  pull-requests: write\n\nsteps:\n  - name: Post the knip results\n    uses: codex-/knip-reporter@v2\n```\n\n## Config\n\nThe following inputs are supported\n\n| Input                 | Description                                                                  | Required | Default                                |\n| --------------------- | ---------------------------------------------------------------------------- | -------- | -------------------------------------- |\n| `token`               | GitHub Personal Access Token for making API requests.                        | `false`  | `${{ github.token }}`                  |\n| `command_script_name` | The package script that runs knip.                                           | `false`  | `knip`                                 |\n| `comment_id`          | ID to use when updating the PR comment. Spaces will be replaced with dashes. | `false`  | `${{ github.workflow }}-knip-reporter` |\n| `annotations`         | Annotate the project code with the knip results.                             | `false`  | `true`                                 |\n| `verbose`             | Include annotated items in the comment report.                               | `false`  | `false`                                |\n| `ignore_results`      | Do not fail the action run if knip results are found.                        | `false`  | `false`                                |\n| `working_directory`   | Run knip in a different directory.                                           | `false`  | `.`                                    |\n\n### Issues\n\nIf you encounter a case where comments are not being posted, or known sections are missing from the report, please [enable step debug logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging) and create an issue with the results and expected behaviour.\n\n### APIs Used\n\n- `Checks`\n  - `Check Runs`\n    - [`Create a check run`](https://docs.github.com/en/rest/checks/runs#create-a-check-run)\n      - POST `/repos/{owner}/{repo}/check-runs`\n    - [`Update a check run`](https://docs.github.com/en/rest/checks/runs#update-a-check-run)\n      - PATCH `/repos/{owner}/{repo}/check-runs/{check_run_id}`\n- `Issues`\n  - `Comments`\n    - [`Create an issue comment`](https://docs.github.com/en/rest/issues/comments#create-an-issue-comment)\n      - POST `/repos/{owner}/{repo}/issues/{issue_number}/comments`\n    - [`List issue comments`](https://docs.github.com/en/rest/issues/comments#list-issue-comments)\n      - GET `/repos/{owner}/{repo}/issues/{issue_number}/comments`\n    - [`Update an issue comment`](https://docs.github.com/en/rest/issues/comments#update-an-issue-comment)\n      - PATCH `/repos/{owner}/{repo}/issues/comments/{comment_id}`\n    - [`Delete an issue comment`](https://docs.github.com/en/rest/issues/comments#delete-an-issue-comment)\n      - DELETE `/repos/{owner}/{repo}/issues/comments/{comment_id}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodex-%2Fknip-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodex-%2Fknip-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodex-%2Fknip-reporter/lists"}