{"id":15714302,"url":"https://github.com/slackapi/slack-health-score","last_synced_at":"2025-10-20T04:30:21.646Z","repository":{"id":238912607,"uuid":"797949712","full_name":"slackapi/slack-health-score","owner":"slackapi","description":"A GitHub Action to report software project health score","archived":false,"fork":false,"pushed_at":"2024-10-01T20:04:49.000Z","size":1974,"stargazers_count":3,"open_issues_count":4,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-04T21:35:46.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slackapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"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}},"created_at":"2024-05-08T19:43:52.000Z","updated_at":"2024-10-01T20:04:51.000Z","dependencies_parsed_at":"2024-05-13T17:36:04.632Z","dependency_job_id":"f3296420-1929-41e9-af92-2ab26d8af3e8","html_url":"https://github.com/slackapi/slack-health-score","commit_stats":null,"previous_names":["slackapi/slack-health-score"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fslack-health-score","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fslack-health-score/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fslack-health-score/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fslack-health-score/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slackapi","download_url":"https://codeload.github.com/slackapi/slack-health-score/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869309,"owners_count":16555579,"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-10-03T21:35:53.255Z","updated_at":"2025-10-20T04:30:21.321Z","avatar_url":"https://github.com/slackapi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-health-score\n\n[![codecov](https://codecov.io/gh/slackapi/slack-health-score/graph/badge.svg?token=WS6IJ61GUU)](https://codecov.io/gh/slackapi/slack-health-score)\n\n\u003e Report a rough metric on high level code quality based on some heuristics Slack Engineering employs\n\n## Installation\n\n### Workflow Setup\n\nIt is recommended to set up this action as a separate GitHub Workflow `job`. This way, any other continuous integration tasks that might be needed to run first, such as code coverage reporting, can be run in a separate job that the Health Score job requires to complete first.\n\nThe following is an example `job` that requires that the `test` job completes first:\n\n```yaml\n  health-score:\n    needs: test\n    permissions:\n      checks: write\n    runs-on: ubuntu-latest\n    steps:\n      - name: Setup repo\n        uses: actions/checkout@v4\n      - name: Report health score\n        uses: slackapi/slack-health-score@v0\n        with:\n          codecov_token: ${{ secrets.CODECOV_API_TOKEN }}\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          extension: ts\n          include: src\n```\n\n### API Tokens\n\nTwo important notes about the API tokens this action relies on:\n\n1. The `github_token` input is used to create a status check on PRs/commits and report the health score using this GitHub API. Therefore, this token must have `checks: write` permission. As you can see in the above example workflow YAML, this is explicitly provided to the job via `permissions: checks: write`.\n2. The `codecov_token` input is used to _retrieve_ code coverage details from codecov.io. You _cannot_ use the CodeCov \"Global Upload\" token as it has insufficient permissions to access CodeCov's HTTP API. You _must_ use [a human-generated API token][codecov-token] for this input.\n\n## Usage\n\n```yaml\n- uses: slackapi/slack-health-score@v0\n  with:\n    # The file extension to inspect as part of health score calculation. For example, 'js'\n    # or 'go' These conditions are logically OR'ed together using -o (OR) in the find command.\n    # This input is required.\n    extension: ''\n\n    # A GitHub access token with permissions to write GitHub Checks. Recommended to set\n    # this to `${{ secrets.GITHUB_TOKEN }}` in a workflow `job` that has `checks: write`\n    # permissions. See the full `job` example at the beginning of this README.\n    # This input is required.\n    github_token: ''\n\n    # Only parse the specified files and directories (recursively). Defaults to `.`.\n    # E.g. \"src\"\n    include: ''\n\n    # Ignore the specified files and directories. Essentially a direct argument into\n    # `find` `-not -path \"{arg}\"`. Defaults to contents of `.gitignore`.\n    # E.g. \"node_modules\"\n    exclude: ''\n\n    # A CodeCov API access token with read permissions to the repo. This _cannot_ be\n    # a CodeCov \"Global Upload\" token - it _must_ be a human user API access token.\n    # Setting this will try to pull coverage information for the repo from CodeCov to\n    # include in health score calculation; not setting it will exclude code coverage\n    # from health score calculation.\n    codecov_token: ''\n\n    # Maximum number of times to try retrieving code coverage information from codecov.\n    # Defaults to 10.\n    codecov_max_attempts: ''\n\n    # Number of milliseconds to wait when retrying retrieving code coverage information\n    # from codecov. Defaults to 10000 (10 seconds).\n    codecov_retry_delay: ''\n\n    # If retrieving code coverage from CodeCov times out (according to the configuration\n    # set up via the `codecov_max_attempts` and `codecov_retry_delay` inputs), should that\n    # cause this action to error out. Defaults to false.\n    codecov_treat_timeout_as_error: ''\n```\n\n## What is Slack's Health Score?\n\nSlack Engineering calculates a health score for software projects making up the product. This score is a heuristic or proxy metric for code quality. It is not perfect and is intended for providing awareness. The score ranges from some negative number to 0 - a score of 0 signals \"no problems detected.\"\n\nThe score is currently calculated from the following:\n\n- Problematic comments. Comments that include \"TODO\", \"HACK\" and \"FIXME\" tend to signal that some corners were cut and shortcuts taken, which may negatively impact the long-term health of a project.\n- Missing code coverage. While not a perfect metric, code coverage via tests is generally correlated with higher quality.\n\n[codecov-token]: https://docs.codecov.com/reference/overview\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fslack-health-score","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslackapi%2Fslack-health-score","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fslack-health-score/lists"}