Project

typocop

0.0
The project is in a healthy, maintained state
Typocop integrates with GitHub Actions to automatically comment on pull requests when typos are detected or when a PR is approved, based on [Crate CI's Typos](https://github.com/crate-ci/typos).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 9.2.0
~> 1.6.3
~> 1.3.2
 Project Readme

Check Typos in Pull Request

Gem Version

Typocop Logo

This GitHub Action automatically checks for typos in the files changed in a pull request. It comments on the pull request with any detected typos and provides suggestions for corrections.

Features

  • Automatically detects typos in files changed in a pull request.
  • Comments on the pull request with a list of typos found and suggested corrections.
  • Approves the pull request if no typos are detected.
  • Dismisses PR approvals if a new commit contains a typo.
  • Removes outdated typo comments when new commits are made.
  • Supports all programming languages.

Usage

  1. Using Typocop GitHub Action:

    1. Copy the .github/workflows/typocop.yml file into your project repository.

      # .github/workflows/typocop.yml
      name: Check Typos in Pull Request
      
      on: [pull_request]
      
      jobs:
        typocop:
          permissions: write-all
          runs-on: ubuntu-latest
          steps:
            - name: Checkout repository
              uses: actions/checkout@v3
              with:
                fetch-depth: 0
      
            - name: Run Typocop Action
              uses: datpmt/typocop@v1.0.2
              with:
                github_token: ${{ secrets.GITHUB_TOKEN }}
                pull_request_id: ${{ github.event.pull_request.number }}
                github_base_ref: ${{ github.base_ref }}
    2. Create a new Pull Request (PR) to trigger the action.

  2. Using Typocop command line

    gem install typocop # install
    
    GITHUB_TOKEN=your_token PULL_REQUEST_ID=your_pull_request_id typocop execute # run action

    Typocop demo

Contributing

We welcome contributions to this project! To contribute:

  1. Fork the repository.
  2. Create a new feature branch (git checkout -b your-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push the changes to your fork (git push origin your-feature).
  5. Open a pull request.

Contributors

References

License

The gem is available as open source under the terms of the MIT License.