[
  {
    "path": ".github/workflows/main.yml",
    "content": "on:\n  pull_request:\n  push:\n    branches: [main, test-me-*]\n\njobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v3\n    - uses: actions/setup-python@v3\n    - name: self test action\n      uses: ./\n"
  },
  {
    "path": ".pre-commit-config.yaml",
    "content": "repos:\n-   repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v6.0.0\n    hooks:\n    -   id: trailing-whitespace\n    -   id: end-of-file-fixer\n    -   id: check-yaml\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2019 Anthony Sottile\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "this action is in maintenance-only mode and will not be accepting new features.\n\ngenerally you want to use [pre-commit.ci] which is faster and has more features.\n\n[pre-commit.ci]: https://pre-commit.ci\n\n___\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/pre-commit/action/main.svg)](https://results.pre-commit.ci/latest/github/pre-commit/action/main)\n[![Build Status](https://github.com/pre-commit/action/actions/workflows/main.yml/badge.svg)](https://github.com/pre-commit/action/actions)\n\npre-commit/action\n=================\n\na GitHub action to run [pre-commit](https://pre-commit.com)\n\n### using this action\n\nTo use this action, make a file `.github/workflows/pre-commit.yml`.  Here's a\ntemplate to get started:\n\n```yaml\nname: pre-commit\n\non:\n  pull_request:\n  push:\n    branches: [main]\n\njobs:\n  pre-commit:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v3\n    - uses: actions/setup-python@v3\n    - uses: pre-commit/action@v3.0.1\n```\n\nThis does a few things:\n\n- clones the code\n- installs python\n- sets up the `pre-commit` cache\n\n### using this action with custom invocations\n\nBy default, this action runs all the hooks against all the files.  `extra_args`\nlets users specify a single hook id and/or options to pass to `pre-commit run`.\n\nHere's a sample step configuration that only runs the `flake8` hook against all\nthe files (use the template above except for the `pre-commit` action):\n\n```yaml\n    - uses: pre-commit/action@v3.0.1\n      with:\n        extra_args: flake8 --all-files\n```\n\n### using this action in private repositories\n\nprior to v3.0.0, this action had custom behaviour which pushed changes back to\nthe pull request when supplied with a `token`.\n\nthis behaviour was removed:\n- it required a PAT (didn't work with short-lived `GITHUB_TOKEN`)\n- properly hiding this `input` from the installation and execution of hooks\n  is intractable in github actions (it is readily available as `$INPUT_TOKEN`)\n- this meant potentially unvetted code could access the token via the\n  environment\n\nyou can _likely_ achieve the same thing with an external action such as\n[git-auto-commit-action] though you may want to take precautions to clear `git`\nhooks or other ways that arbitrary code execution can occur when running\n`git commit` / `git push` (for example [core.fsmonitor]).\n\nwhile unrelated to this action, [pre-commit.ci] avoids these problems by\ninstalling and executing isolated from the short-lived repository-scoped\n[installation access token].\n\n[git-auto-commit-action]: https://github.com/stefanzweifel/git-auto-commit-action\n[core.fsmonitor]: https://github.blog/2022-04-12-git-security-vulnerability-announced/\n[pre-commit.ci]: https://pre-commit.ci\n[installation access token]: https://docs.github.com/en/rest/apps/apps#create-an-installation-access-token-for-an-app\n"
  },
  {
    "path": "action.yml",
    "content": "name: pre-commit\ndescription: run pre-commit\ninputs:\n  extra_args:\n    description: options to pass to pre-commit run\n    required: false\n    default: '--all-files'\nruns:\n  using: composite\n  steps:\n  - run: python -m pip install pre-commit\n    shell: bash\n  - run: python -m pip freeze --local\n    shell: bash\n  - uses: actions/cache@v4\n    with:\n      path: ~/.cache/pre-commit\n      key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}\n  - run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}\n    shell: bash\n"
  }
]