rojopolis / spellcheck-github-actions

Spell check action
MIT License
132 stars 38 forks source link

Verification Scope Restriction #173

Open daelynum opened 1 year ago

daelynum commented 1 year ago

The spelling verification reviews all repository files, wasting time on unchanged files. Is it possible to limit checks to files in a specific pull request, focusing only on new or modified content?

Adding a "changed_only: true" flag could be a viable solution to this issue.

jonasbn commented 1 year ago

Hi @daelynum

This sound like a good suggestion, I will dig into a possible solution.

jonasbn commented 11 months ago

Hi @daelynum

I have attempted with a configuration using the action:

This is the example/proof of concept and it seems to be working, it might require some tweaks and it will require some additional documentation updates.

name: Spellcheck Action
on: push

jobs:
  build:
    name: Spellcheck
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - uses: tj-actions/changed-files@v39
      id: changed_files

    - name: Run Spellcheck
      id: spellcheck
      uses: rojopolis/spellcheck-github-actions@0.34.0
      with:
        task_name: Markdown
        source_files: ${{ steps.changed_files.outputs.all_changed_files }}
        output_file: spellcheck-output.txt

    - uses: actions/upload-artifact@v3
      if: '!cancelled()'
      with:
        name: Spellcheck Output
        path: spellcheck-output.txt

REF: https://github.com/jonasbn/til/blob/master/.github/workflows/spellcheck.yml

And you can see an example run here:

Let me know what think.

daelynum commented 9 months ago

Hi @jonasbn, sorry for the long return with the answer. The action works great! I appreciate your help.