Giter VIP home page Giter VIP logo

pre-commit-action's Introduction

pre-commit-action

GitHub Action: Try Me Test Workflow Status Copy/Paste: 0%

Automated Updates: Renovate Package Management: Poetry Git Hooks: pre-commit Commit Style: Conventional Commits Releases: Semantic Versioning Code Style: Prettier Code Style: EditorConfig Editor: Visual Studio Code

GitHub Action Optimized for Running ScribeMD/pre-commit-hooks

Install asdf, Node.js, Python, and Poetry; use Poetry to install pre-commit; run pre-commit hooks; and optionally use commitizen-action to bump the project version. Assume the presence of .tool-versions specifying versions for Node.js, Python, and Poetry as well as poetry.lock. Cache Poetry dependencies. Cache Node.js packages specified in .mega-linter.yaml, .pre-commit-config.yaml, and/or .pre-commit-hooks.yaml. Since pre-commit supports Docker, cache Docker images. Cache pre-commit hook environments. Set origin/HEAD to the default branch to support the commitizen-branch hook. Skip the commitizen-branch hook and no-commit-to-branch hook on main to avoid false positives. Finally, uninstall pre-commit hooks to avoid breaking subsequent Git commands. This relies on specifying default_install_hook_types in .pre-commit-config.yaml.

Usage

  • Commitizen relies on tags in order to perform an incremental release, and the commitizen-branch hook relies on origin/HEAD being set to the default branch, so you must pass fetch-depth: 0 to checkout.

  • Add the following step before your first use of Docker since rootless-docker is used to avoid permission issues:

    - name: Install and run pre-commit hooks.
      uses: ScribeMD/[email protected]

Inputs

Optional

bump

default: true

If true, run commitizen-action on push to main to commit a version bump and tag a release if there are any release-worthy changes. Uses your GITHUB_TOKEN, which must have write access to your repository.

Supported Runners

Please refer to README.md of ScribeMD/rootless-docker.

Permissions

The contents:write permission is required to bump the project version via Commitizen unless bump is false.

Changelog

Please refer to CHANGELOG.md.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.