11# spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
22name : Spell checking
33
4- # Comment management is handled through a secondary job, for details see:
5- # https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
6- #
7- # `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
8- # (in odd cases, it might actually run just to collapse a comment, but that's fairly rare)
9- # it needs `contents: write` in order to add a comment.
10- #
11- # `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
12- # or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
13- # it needs `pull-requests: write` in order to manipulate those comments.
14-
15- # Updating pull request branches is managed via comment handling.
16- # For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
17- #
18- # These elements work together to make it happen:
19- #
20- # `on.issue_comment`
21- # This event listens to comments by users asking to update the metadata.
22- #
23- # `jobs.update`
24- # This job runs in response to an issue_comment and will push a new commit
25- # to update the spelling metadata.
26- #
27- # `with.experimental_apply_changes_via_bot`
28- # Tells the action to support and generate messages that enable it
29- # to make a commit to update the spelling metadata.
30- #
31- # `with.ssh_key`
32- # In order to trigger workflows when the commit is made, you can provide a
33- # secret (typically, a write-enabled github deploy key).
34- #
35- # For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
36-
37- # SARIF reporting
38- #
39- # Access to SARIF reports is generally restricted (by GitHub) to members of the repository.
40- #
41- # Requires enabling `security-events: write`
42- # and configuring the action with `use_sarif: 1`
43- #
44- # For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-SARIF-output
45-
46- # Minimal workflow structure:
47- #
48- # on:
49- # push:
50- # ...
51- # pull_request_target:
52- # ...
53- # jobs:
54- # # you only want the spelling job, all others should be omitted
55- # spelling:
56- # # remove `security-events: write` and `use_sarif: 1`
57- # # remove `experimental_apply_changes_via_bot: 1`
58- # ... otherwise adjust the `with:` as you wish
59-
604on :
615 push :
626 branches :
8832 if : ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }}
8933 concurrency :
9034 group : spelling-${{ github.event.pull_request.number || github.ref }}
91- # note: If you use only_check_changed_files, you do not want cancel-in-progress
9235 cancel-in-progress : true
9336 steps :
9437 - name : check-spelling
@@ -98,12 +41,12 @@ jobs:
9841 suppress_push_for_open_pull_request : ${{ github.actor != 'dependabot[bot]' && 1 }}
9942 checkout : true
10043 check_file_names : 1
101- spell_check_this : microsoft/terminal@main
44+ spell_check_this : ${{ github.repository }}@${{ github.ref }}
10245 post_comment : 0
10346 use_magic_file : 1
10447 report-timing : 1
10548 warnings : bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end
106- experimental_apply_changes_via_bot : ${{ github.repository_owner != 'microsoft ' && 1 }}
49+ experimental_apply_changes_via_bot : ${{ github.repository_owner == 'SoftwareDevLabs ' && 1 }}
10750 use_sarif : 1
10851 check_extra_dictionaries : " "
10952 dictionary_source_prefixes : >
14992
15093 comment-push :
15194 name : Report (Push)
152- # If your workflow isn't running on push, you can remove this job
15395 runs-on : ubuntu-latest
15496 needs : spelling
15597 permissions :
@@ -161,12 +103,11 @@ jobs:
161103 uses : check-spelling/check-spelling@v0.0.25
162104 with :
163105 checkout : true
164- spell_check_this : microsoft/terminal@main
106+ spell_check_this : ${{ github.repository }}@${{ github.ref }}
165107 task : ${{ needs.spelling.outputs.followup }}
166108
167109 comment-pr :
168110 name : Report (PR)
169- # If you workflow isn't running on pull_request*, you can remove this job
170111 runs-on : ubuntu-latest
171112 needs : spelling
172113 permissions :
@@ -179,9 +120,9 @@ jobs:
179120 uses : check-spelling/check-spelling@v0.0.25
180121 with :
181122 checkout : true
182- spell_check_this : microsoft/terminal@main
123+ spell_check_this : ${{ github.repository }}@${{ github.ref }}
183124 task : ${{ needs.spelling.outputs.followup }}
184- experimental_apply_changes_via_bot : ${{ github.repository_owner != 'microsoft ' && 1 }}
125+ experimental_apply_changes_via_bot : ${{ github.repository_owner == 'SoftwareDevLabs ' && 1 }}
185126
186127 update :
187128 name : Update PR
@@ -191,7 +132,7 @@ jobs:
191132 actions : read
192133 runs-on : ubuntu-latest
193134 if : ${{
194- github.repository_owner != 'microsoft ' &&
135+ github.repository_owner == 'SoftwareDevLabs ' &&
195136 github.event_name == 'issue_comment' &&
196137 github.event.issue.pull_request &&
197138 contains(github.event.comment.body, '@check-spelling-bot apply') &&
@@ -204,6 +145,6 @@ jobs:
204145 - name : apply spelling updates
205146 uses : check-spelling/check-spelling@v0.0.25
206147 with :
207- experimental_apply_changes_via_bot : ${{ github.repository_owner ! = 'SoftwareDevLabs' && 1 }}
148+ experimental_apply_changes_via_bot : ${{ github.repository_owner = = 'SoftwareDevLabs' && 1 }}
208149 checkout : true
209150 # ssh_key: "${{ secrets.CHECK_SPELLING }}"
0 commit comments