{"id":28475200,"url":"https://github.com/tagdots/update-pre-commit-action","last_synced_at":"2025-06-15T11:07:08.770Z","repository":{"id":296250246,"uuid":"992763655","full_name":"tagdots/update-pre-commit-action","owner":"tagdots","description":"Run update-pre-commit to update pre-commit configuration and create pull request","archived":false,"fork":false,"pushed_at":"2025-06-02T02:29:43.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-07T14:05:41.648Z","etag":null,"topics":["action","automation","devops","devsecops","github-actions","pre-commit","update-pre-commit","workflow"],"latest_commit_sha":null,"homepage":"","language":null,"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/tagdots.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}},"created_at":"2025-05-29T17:13:02.000Z","updated_at":"2025-06-02T02:29:45.000Z","dependencies_parsed_at":"2025-05-29T18:44:40.651Z","dependency_job_id":"3d442992-7715-42d2-87bd-336e0dc363d0","html_url":"https://github.com/tagdots/update-pre-commit-action","commit_stats":null,"previous_names":["tagdots/update-pre-commit-action"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagdots%2Fupdate-pre-commit-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagdots%2Fupdate-pre-commit-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagdots%2Fupdate-pre-commit-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagdots%2Fupdate-pre-commit-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tagdots","download_url":"https://codeload.github.com/tagdots/update-pre-commit-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagdots%2Fupdate-pre-commit-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258777290,"owners_count":22756075,"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":["action","automation","devops","devsecops","github-actions","pre-commit","update-pre-commit","workflow"],"created_at":"2025-06-07T14:05:41.424Z","updated_at":"2025-06-15T11:07:08.765Z","avatar_url":"https://github.com/tagdots.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# update-pre-commit-action\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10601/badge)](https://www.bestpractices.dev/projects/10601) [![CI](https://github.com/tagdots/update-pre-commit/actions/workflows/ci.yaml/badge.svg)](https://github.com/tagdots/update-pre-commit/actions/workflows/ci.yaml) [![Code Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/tagdots/update-pre-commit/refs/heads/badge/coverage.json)](https://github.com/tagdots/update-pre-commit/actions/workflows/cron-coverage.yaml)\n\n\nThis action keeps your `pre-commit` hooks up to date and creates pull request.\n\n\u003cbr\u003e\n\nOn the `GitHub Marketplace`, most of the actions that update `pre-commit` hooks run `pre-commit autoupdate` under the hood.  Among them, some stitch together with another action to create pull request.  Unfortunately, a lot of them are not regularly maintained.\n\n\u003cbr\u003e\n\nHence comes **update-pre-commit-action**, which uses [**update-pre-commit**](https://github.com/tagdots/update-pre-commit) with the goal to:\n1. reduce your supply chain risks with `openssf best practices` in our development and operation.\n1. automate your `change management operation` with built-in feature to create `pull request` on **GitHub**.\n1. protect you from using unreliable revs such as `alpha`, `beta`, `prerelease`, and `rc`.\n\n\u003cbr\u003e\n\n## 😎 Roll out 1 2 3\n\n1. use the example workflows below to create your own workflow inside `.github/workflows/`.\n1. merge your code with the new workflow.\n1. done!!\n\n\u003cbr\u003e\n\n## 🔍 How to use update-pre-commit-action?\n\n### Use Case 1️⃣ - summary descriptions\n**update-pre-commit-action** in the workflow below will:\n\n* run on a scheduled interval - every day at 5:30 pm UTC  (`- cron: '30 17 * * *'`)\n* have a job that needs write permissions on `contents: write` and `pull-requests: write`\n* use pinned full commit hash from [the latest release](https://github.com/tagdots/update-pre-commit-action/releases)\n* update `.pre-commit-config.yaml` when new revs become available (`dry-run: false`)\n* open a pull request when new revs become available (`open-pr: true`)\n\n\u003cbr\u003e\n\n### Use Case 1️⃣ - example workflow\n```\nname: update-pre-commit-action\n\non:\n  # on schedule: e.g. every day at 5:30 pm UTC\n  schedule:\n    - cron: '30 17 * * *'\n\n  # on demand\n  workflow_dispatch:\n\npermissions:\n  contents: read\n  pull-requests: read\n\njobs:\n  update-pre-commit:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n\n    steps:\n    - name: Run update-pre-commit\n      id: update-pre-commit\n\n      env:\n        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      # https://github.com/tagdots/update-pre-commit-action/releases\n      # - replace XXXXXXXXXXXXXXX with full commit hash from the latest release\n      # - replace 1.0.0           with the corresponding release tag name\n      uses: tagdots/update-pre-commit-action@XXXXXXXXXXXXXXX # 1.0.0\n\n      with:\n        file: .pre-commit-config.yaml\n        dry-run: false\n        open-pr: true\n```\n\n\u003cbr\u003e\n\n### Use Case 2️⃣ - summary descriptions\n**update-pre-commit-action** in the workflow below will:\n\n* run on a scheduled interval - every day at 5:30 pm UTC  (`- cron: '30 17 * * *'`)\n* use pinned full commit hash from [the latest release](https://github.com/tagdots/update-pre-commit-action/releases)\n* update `.pre-commit-config.yaml` when new revs become available (`dry-run: false`)\n* _NOT_ open a pull request when new revs become available (`open-pr: false`)\n\nYou will review the workflow results, cherry-pick updates, and open a pull-request yourself.\n\n\u003cbr\u003e\n\n### Use Case 2️⃣ - example workflow\n```\nname: update-pre-commit-action\n\non:\n  # on schedule: e.g. every day at 5:30 pm UTC\n  schedule:\n    - cron: '30 17 * * *'\n\n  # on demand\n  workflow_dispatch:\n\npermissions:\n  contents: read\n  pull-requests: read\n\njobs:\n  update-pre-commit:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Run update-pre-commit\n      id: update-pre-commit\n\n      env:\n        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      # https://github.com/tagdots/update-pre-commit-action/releases\n      # - replace XXXXXXXXXXXXXXX with full commit hash from the latest release\n      # - replace 1.0.0           with the corresponding release tag name\n      uses: tagdots/update-pre-commit-action@XXXXXXXXXXXXXXX # 1.0.0\n\n      with:\n        file: .pre-commit-config.yaml\n        dry-run: false\n        open-pr: false\n```\n\n\u003cbr\u003e\n\n## 😕  Troubleshooting\n\nWe are here to help - open an [issue](https://github.com/tagdots/update-pre-commit-action/issues)\n\n\u003cbr\u003e\n\n## 📖 License\n\n[MIT License](https://github.com/tagdots/update-pre-commit-action/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftagdots%2Fupdate-pre-commit-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftagdots%2Fupdate-pre-commit-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftagdots%2Fupdate-pre-commit-action/lists"}