| 
1 |  | -name: Spell Check  | 
2 |  | - | 
3 |  | -# Comment management is handled through a secondary job, for details see:  | 
4 |  | -# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions  | 
5 |  | -#  | 
6 |  | -# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment  | 
7 |  | -#   (in odd cases, it might actually run just to collapse a comment, but that's fairly rare)  | 
8 |  | -#   it needs `contents: write` in order to add a comment.  | 
9 |  | -#  | 
10 |  | -# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment  | 
11 |  | -#   or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)  | 
12 |  | -#   it needs `pull-requests: write` in order to manipulate those comments.  | 
13 |  | - | 
14 |  | -# Updating pull request branches is managed via comment handling.  | 
15 |  | -# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list  | 
16 |  | -#  | 
17 |  | -# These elements work together to make it happen:  | 
18 |  | -#  | 
19 |  | -# `on.issue_comment`  | 
20 |  | -#   This event listens to comments by users asking to update the metadata.  | 
21 |  | -#  | 
22 |  | -# `jobs.update`  | 
23 |  | -#   This job runs in response to an issue_comment and will push a new commit  | 
24 |  | -#   to update the spelling metadata.  | 
25 |  | -#  | 
26 |  | -# `with.experimental_apply_changes_via_bot`  | 
27 |  | -#   Tells the action to support and generate messages that enable it  | 
28 |  | -#   to make a commit to update the spelling metadata.  | 
29 |  | -#  | 
30 |  | -# `with.ssh_key`  | 
31 |  | -#   In order to trigger workflows when the commit is made, you can provide a  | 
32 |  | -#   secret (typically, a write-enabled github deploy key).  | 
33 |  | -#  | 
34 |  | -#   For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key  | 
35 |  | - | 
36 |  | -on:  | 
37 |  | -  # Switch from `pull_request_target` event to reduce distraction from comments  | 
38 |  | -  # regarding errors reported in unmodified files.  | 
39 |  | -  pull_request:  | 
40 |  | -    branches:  | 
41 |  | -      - master  | 
42 |  | -    tags-ignore:  | 
43 |  | -      - "**"  | 
44 |  | -    types:  | 
45 |  | -      - 'opened'  | 
46 |  | -      - 'reopened'  | 
47 |  | -      - 'synchronize'  | 
48 |  | - | 
49 |  | -jobs:  | 
50 |  | -  spelling:  | 
51 |  | -    name: Spell Check  | 
52 |  | -    permissions:  | 
53 |  | -      contents: read  | 
54 |  | -      pull-requests: read  | 
55 |  | -      actions: read  | 
56 |  | -    outputs:  | 
57 |  | -      followup: ${{ steps.spelling.outputs.followup }}  | 
58 |  | -    runs-on: ubuntu-latest  | 
59 |  | -    if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"  | 
60 |  | -    concurrency:  | 
61 |  | -      group: spelling-${{ github.event.pull_request.number || github.ref }}  | 
62 |  | -      # note: If you use only_check_changed_files, you do not want cancel-in-progress  | 
63 |  | -      cancel-in-progress: true  | 
64 |  | -    steps:  | 
65 |  | -    - uses: actions/checkout@v4  | 
66 |  | -      with:  | 
67 |  | -        fetch-depth: 0  | 
68 |  | - | 
69 |  | -    - name: Get all changed markdown files  | 
70 |  | -      uses: tj-actions/changed-files@v45  | 
71 |  | -      id: changed-text-files  | 
72 |  | -      with:  | 
73 |  | -        files: |  | 
74 |  | -           **.md  | 
75 |  | -           _data/**.yml  | 
76 |  | -
  | 
77 |  | -    - name: Run Spellcheck  | 
78 |  | -      if: steps.changed-text-files.outputs.any_changed == 'true'  | 
79 |  | -      id: spelling  | 
80 |  | -      uses:  check-spelling/[email protected]  | 
81 |  | -      with:  | 
82 |  | -        # This workflow runs in response to both `push` and `pull_request`, if there's an open `pull_request` in the same repository  | 
83 |  | -        # for a given branch, there's no reason to spend resources checking both the `push` and the `pull_request`, so this flag tells  | 
84 |  | -        # the action while running for the `push` to find the `pull_request` and stop working early:  | 
85 |  | -        suppress_push_for_open_pull_request: 1  | 
86 |  | -        # The action will manage checking out the repository itself instead of requiring the workflow to use `actions/checkout...`:  | 
87 |  | -        #checkout: true  | 
88 |  | -        # If running without `: write`, posting a comment won't work, and for security `: write` permissions are left to a distinct  | 
89 |  | -        # (optional) job, here we skip trying to post a comment:  | 
90 |  | -        post_comment: 0  | 
91 |  | -        use_magic_file: 1  | 
92 |  | -        only_check_changed_files: true  | 
93 |  | -        extra_dictionary_limit: 10  | 
94 |  | -        extra_dictionaries:  | 
95 |  | -          cspell:software-terms/software-terms.txt  | 
96 |  | -          cspell:php/php.txt  | 
97 |  | -          cspell:node/node.txt  | 
98 |  | -          cspell:django/django.txt  | 
99 |  | -          cspell:html/html.txt  | 
100 |  | -          cspell:npm/npm.txt  | 
101 |  | -          cspell:ruby/ruby.txt  | 
102 |  | -          cspell:fullstack/fullstack.txt  | 
103 |  | -          cspell:filetypes/filetypes.txt  | 
104 |  | -        check_extra_dictionaries: ''  | 
105 |  | -        dictionary_source_prefixes: >-  | 
106 |  | -          {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"}  | 
 | 1 | +- name: Run Spellcheck  | 
 | 2 | +  id: spelling  | 
 | 3 | +  uses:  check-spelling/[email protected]  | 
 | 4 | +  with:  | 
 | 5 | +    only_check_changed_files: true  | 
 | 6 | +    use_magic_file: 1  | 
 | 7 | +    post_comment: 0  | 
 | 8 | +    suppress_push_for_open_pull_request: 1  | 
 | 9 | +    extra_dictionary_limit: 10  | 
 | 10 | +    extra_dictionaries: |  | 
 | 11 | +      cspell:software-terms/software-terms.txt  | 
 | 12 | +      cspell:php/php.txt  | 
 | 13 | +      cspell:node/node.txt  | 
 | 14 | +      cspell:django/django.txt  | 
 | 15 | +      cspell:html/html.txt  | 
 | 16 | +      cspell:npm/npm.txt  | 
 | 17 | +      cspell:ruby/ruby.txt  | 
 | 18 | +      cspell:fullstack/fullstack.txt  | 
 | 19 | +      cspell:filetypes/filetypes.txt  | 
 | 20 | +    dictionary_source_prefixes: >-  | 
 | 21 | +      {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"}  | 
0 commit comments