From 9b2aaf700f09fd86d9246b5cfd67e411f34ebb5e Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Fri, 26 Jan 2024 07:40:08 +0000 Subject: [PATCH] Adding workflow to automatically create typo PRs (#5724) * chore: adding workflow and note in CONTRIBUTING.md * chore: clean up workflow * Update CONTRIBUTING.md --------- Co-authored-by: Carlos Rodriguez --- .github/.misspell-fixer.ignore | 1 + .github/workflows/spell-checker.yml | 25 +++++++++++++++++++++++++ CONTRIBUTING.md | 4 ++++ 3 files changed, 30 insertions(+) create mode 100644 .github/.misspell-fixer.ignore create mode 100644 .github/workflows/spell-checker.yml diff --git a/.github/.misspell-fixer.ignore b/.github/.misspell-fixer.ignore new file mode 100644 index 00000000000..c107fa733bf --- /dev/null +++ b/.github/.misspell-fixer.ignore @@ -0,0 +1 @@ +\*.pb.go diff --git a/.github/workflows/spell-checker.yml b/.github/workflows/spell-checker.yml new file mode 100644 index 00000000000..8242e855af0 --- /dev/null +++ b/.github/workflows/spell-checker.yml @@ -0,0 +1,25 @@ +name: Fix typos nightly + +on: + workflow_dispatch: {} # enable manual running of workflow. + schedule: + - cron: "0 8 * * *" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: sobolevn/misspell-fixer-action@e5368f1b21585248afad4d32df9bc100451dbbff + - uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "chore: fixes by misspell-fixer" + title: "chore: typos fix by misspell-fixer" + branch: "bot/fix-typos" + delete-branch: true + body: | + This PR fixes typos in the codebase. + Please, review it and merge if everything is fine. + If there are proto changes, please, run `make proto-all` and commit changes. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f3229fd29f6..24f0a839d0b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,6 +52,10 @@ If you would like to contribute, follow this process: Please make sure to check out our [Pull request guidelines](./docs/dev/pull-requests.md) for more information. +> Note: At this time, we will not be accepting contributions that only fix spelling +> or grammar errors in documentation, code or elsewhere. The repository has a nightly job that +> spell checks all files and will automatically open PRs for any spelling errors. + ## Relevant development docs - [Project structure](./docs/dev/project-structure.md)