Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification Scope Restriction #173

Open
daelynum opened this issue Sep 10, 2023 · 3 comments
Open

Verification Scope Restriction #173

daelynum opened this issue Sep 10, 2023 · 3 comments
Assignees
Labels
support Support not requiring code changes

Comments

@daelynum
Copy link

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
Copy link
Collaborator

jonasbn commented Sep 11, 2023

Hi @daelynum

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

@jonasbn jonasbn self-assigned this Sep 11, 2023
@jonasbn jonasbn added the enhancement New feature or request label Sep 11, 2023
@jonasbn
Copy link
Collaborator

jonasbn commented Oct 6, 2023

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.

@jonasbn jonasbn added support Support not requiring code changes and removed enhancement New feature or request labels Oct 6, 2023
@jonasbn jonasbn pinned this issue Oct 6, 2023
@daelynum
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Support not requiring code changes
Projects
None yet
Development

No branches or pull requests

2 participants