{"id":34687825,"url":"https://github.com/leinardi/gha-pre-commit-reviewdog-template","last_synced_at":"2026-04-25T02:38:19.920Z","repository":{"id":327434616,"uuid":"1109297599","full_name":"leinardi/gha-pre-commit-reviewdog-template","owner":"leinardi","description":"Template for GitHub Actions that run pre-commit hooks","archived":false,"fork":false,"pushed_at":"2026-04-22T11:53:14.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-22T13:32:10.848Z","etag":null,"topics":["gh-leinardi-iac","github-actions","pre-commit","reviewdog"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/leinardi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-03T15:57:13.000Z","updated_at":"2026-04-22T11:53:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leinardi/gha-pre-commit-reviewdog-template","commit_stats":null,"previous_names":["leinardi/gha-pre-commit-reviewdog-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/leinardi/gha-pre-commit-reviewdog-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leinardi%2Fgha-pre-commit-reviewdog-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leinardi%2Fgha-pre-commit-reviewdog-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leinardi%2Fgha-pre-commit-reviewdog-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leinardi%2Fgha-pre-commit-reviewdog-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leinardi","download_url":"https://codeload.github.com/leinardi/gha-pre-commit-reviewdog-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leinardi%2Fgha-pre-commit-reviewdog-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32248346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"online","status_checked_at":"2026-04-25T02:00:06.260Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gh-leinardi-iac","github-actions","pre-commit","reviewdog"],"created_at":"2025-12-24T21:55:28.387Z","updated_at":"2026-04-25T02:38:19.901Z","avatar_url":"https://github.com/leinardi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run \u003cTOOL\u003e via pre-commit + reviewdog\n\n\u003e Template README — replace `\u003cTOOL\u003e` and `\u003cHOOK_ID\u003e` with your actual tool and pre-commit hook name.\n\nThis GitHub Action runs a single [`pre-commit`](https://pre-commit.com/) hook on a diff range and reports results to pull requests\nusing [reviewdog](https://github.com/reviewdog/reviewdog).\n\nTypical use case:\n\n- Run the `\u003cHOOK_ID\u003e` pre-commit hook (e.g. `actionlint-oneline`)\n- Annotate problems directly on the PR diff\n- Fail the job if violations are found\n\n## Requirements\n\n- A `.pre-commit-config.yaml` in your repository with the `\u003cHOOK_ID\u003e` hook enabled\n- GitHub Actions enabled on the repository\n- `secrets.GITHUB_TOKEN` available (default on GitHub-hosted runners)\n\n## Inputs\n\n| Name           | Required | Description                                         |\n|----------------|----------|-----------------------------------------------------|\n| `from-ref`     | ✅        | Base git ref (e.g. PR base SHA)                     |\n| `to-ref`       | ✅        | Head git ref (e.g. PR head SHA)                     |\n| `github-token` | ✅        | GitHub token for reviewdog (`secrets.GITHUB_TOKEN`) |\n\n## Outputs\n\n| Name       | Description                                  |\n|------------|----------------------------------------------|\n| `exitcode` | Exit code of the `\u003cHOOK_ID\u003e` pre-commit hook |\n\n## Usage\n\nIn your workflow (example for a pull request):\n\n```yaml\nname: Lint with \u003cTOOL\u003e\n\non:\n  pull_request:\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Run \u003cTOOL\u003e via pre-commit + reviewdog\n        uses: \u003cOWNER\u003e/\u003cREPO\u003e@v1\n        with:\n          from-ref: ${{ github.event.pull_request.base.sha }}\n          to-ref: ${{ github.event.pull_request.head.sha }}\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n````\n\n## Versioning\n\nIt’s recommended to pin to the major version:\n\n```yaml\nuses: \u003cOWNER\u003e/\u003cREPO\u003e@v1\n```\n\nFor fully reproducible behavior, pin to an exact tag:\n\n```yaml\nuses: \u003cOWNER\u003e/\u003cREPO\u003e@v1.0.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleinardi%2Fgha-pre-commit-reviewdog-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleinardi%2Fgha-pre-commit-reviewdog-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleinardi%2Fgha-pre-commit-reviewdog-template/lists"}