Check Typos in Pull Request
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
-
Using Typocop GitHub Action:
-
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 }}
-
Create a new Pull Request (PR) to trigger the action.
-
-
Using Typocop command line
gem install typocop # install GITHUB_TOKEN=your_token PULL_REQUEST_ID=your_pull_request_id typocop execute # run action
Contributing
We welcome contributions to this project! To contribute:
- Fork the repository.
- Create a new feature branch (git checkout -b your-feature).
- Commit your changes (git commit -am 'Add some feature').
- Push the changes to your fork (git push origin your-feature).
- Open a pull request.
Contributors
- Tran Dang Duc Dat (datpmt)
- Hoang Duc Quan (BlazingRockStorm)
References
License
The gem is available as open source under the terms of the MIT License.