Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 59 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,78 @@
# Check Typos in Pull Request
[![Gem Version](https://badge.fury.io/rb/typocop.svg)](https://badge.fury.io/rb/typocop)

![image](typocop.png)
![Typocop Logo](typocop.png)

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

- Detects typos in files that are part of the pull request.
- Provides a brief output of typos found in each file.
- Comments on the pull request with the results.
- Approve the PR if no typos.
- Dismiss approvals on pull requests if new commit contains typo.
- Delete outdated typos comments.
- Supports all programing languages.
- 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

- Copy file `.github/workflows/typocop.yml` into your project.
- Create new PR.
1. **Using Typocop GitHub Action:**

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

```yaml
# .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**

- Tran Dang Duc Dat [datpmt](https://github.com/datpmt)
- Hoang Duc Quan [BlazingRockStorm](https://github.com/BlazingRockStorm)
```bash
gem install typocop # install

I welcome contributions to this project.
GITHUB_TOKEN=your_token PULL_REQUEST_ID=your_pull_request_id typocop execute # run action
```

![Typocop demo](typocop.gif "")

## 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

1. Fork it.
2. Create your feature branch (`git checkout -b your-feature`).
3. Commit your changes (`git commit -am 'Add some feature'`).
4. Push to the branch (`git push origin your-feature`).
5. Create a new pull request.
- Tran Dang Duc Dat ([datpmt](https://github.com/datpmt))
- Hoang Duc Quan ([BlazingRockStorm](https://github.com/BlazingRockStorm))

## References
1. https://github.com/crate-ci/typos
2. https://github.com/prontolabs/pronto
- [Crate CI - Typos](https://github.com/crate-ci/typos)
- [Pronto Labs](https://github.com/prontolabs/pronto)

## License
The gem is available as open source under the terms of the [MIT License](LICENSE).
Binary file added typocop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.