| 
 | 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 | +    - name: check-spelling  | 
 | 66 | +      id: spelling  | 
 | 67 | +      uses:  check-spelling/[email protected]  | 
 | 68 | +      with:  | 
 | 69 | +        # This workflow runs in response to both `push` and `pull_request`, if there's an open `pull_request` in the same repository  | 
 | 70 | +        # for a given branch, there's no reason to spend resources checking both the `push` and the `pull_request`, so this flag tells  | 
 | 71 | +        # the action while running for the `push` to find the `pull_request` and stop working early:  | 
 | 72 | +        suppress_push_for_open_pull_request: 1  | 
 | 73 | +        # The action will manage checking out the repository itself instead of requiring the workflow to use `actions/checkout...`:  | 
 | 74 | +        checkout: true  | 
 | 75 | +        # If running without `: write`, posting a comment won't work, and for security `: write` permissions are left to a distinct  | 
 | 76 | +        # (optional) job, here we skip trying to post a comment:  | 
 | 77 | +        post_comment: 0  | 
 | 78 | +        use_magic_file: 1  | 
 | 79 | +        extra_dictionary_limit: 10  | 
 | 80 | +        extra_dictionaries:  | 
 | 81 | +          cspell:software-terms/software-terms.txt  | 
 | 82 | +          cspell:php/php.txt  | 
 | 83 | +          cspell:node/node.txt  | 
 | 84 | +          cspell:django/django.txt  | 
 | 85 | +          cspell:html/html.txt  | 
 | 86 | +          cspell:npm/npm.txt  | 
 | 87 | +          cspell:ruby/ruby.txt  | 
 | 88 | +          cspell:fullstack/fullstack.txt  | 
 | 89 | +          cspell:filetypes/filetypes.txt  | 
 | 90 | +        check_extra_dictionaries: ''  | 
 | 91 | +        dictionary_source_prefixes: >-  | 
 | 92 | +          {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"}  | 
 | 93 | +
  | 
 | 94 | +# This workflow has opted not to use comments (users can view the report in GitHub Step Summary)  | 
0 commit comments