Skip to content

Commit 084dedc

Browse files
committed
Use read-only pull request spell checks without bot comments
1 parent 64bafad commit 084dedc

1 file changed

Lines changed: 1 addition & 76 deletions

File tree

‎.github/workflows/spellCheck.yml‎

Lines changed: 1 addition & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,13 @@
33

44
name: Check Spelling
55

6-
# Comment management is handled through a secondary job, for details see:
7-
# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
8-
#
9-
# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
10-
# (in odd cases, it might actually run just to collapse a comment, but that's fairly rare)
11-
# it needs `contents: write` in order to add a comment.
12-
#
13-
# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
14-
# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
15-
# it needs `pull-requests: write` in order to manipulate those comments.
16-
17-
# Updating pull request branches is managed via comment handling.
18-
# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
19-
#
20-
# These elements work together to make it happen:
21-
#
22-
# `on.issue_comment`
23-
# This event listens to comments by users asking to update the metadata.
24-
#
25-
# `jobs.update`
26-
# This job runs in response to an issue_comment and will push a new commit
27-
# to update the spelling metadata.
28-
#
29-
# `with.experimental_apply_changes_via_bot`
30-
# Tells the action to support and generate messages that enable it
31-
# to make a commit to update the spelling metadata.
32-
#
33-
# `with.ssh_key`
34-
# In order to trigger workflows when the commit is made, you can provide a
35-
# secret (typically, a write-enabled github deploy key).
36-
#
37-
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
38-
39-
# SARIF reporting
40-
#
41-
# Access to SARIF reports is generally restricted (by GitHub) to members of the repository.
42-
#
43-
# Requires enabling `security-events: write`
44-
# and configuring the action with `use_sarif: 1`
45-
#
46-
# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-SARIF-output
47-
48-
# Minimal workflow structure:
49-
#
50-
# on:
51-
# push:
52-
# ...
53-
# pull_request_target:
54-
# ...
55-
# jobs:
56-
# # you only want the spelling job, all others should be omitted
57-
# spelling:
58-
# # remove `security-events: write` and `use_sarif: 1`
59-
# # remove `experimental_apply_changes_via_bot: 1`
60-
# ... otherwise adjust the `with:` as you wish
61-
626
on:
637
push:
648
branches:
659
- "**"
6610
tags-ignore:
6711
- "**"
68-
pull_request_target:
12+
pull_request:
6913
branches:
7014
- "**"
7115
types:
@@ -80,8 +24,6 @@ jobs:
8024
contents: read
8125
pull-requests: read
8226
actions: read
83-
outputs:
84-
followup: ${{ steps.spelling.outputs.followup }}
8527
runs-on: ubuntu-latest
8628
if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }}
8729
concurrency:
@@ -127,20 +69,3 @@ jobs:
12769
cspell:cpp/ecosystem.txt
12870
cspell:typescript/typescript.txt
12971
cspell:cpp/lang-keywords.txt
130-
131-
comment-pr:
132-
name: Report (PR)
133-
# If you workflow isn't running on pull_request*, you can remove this job
134-
runs-on: ubuntu-latest
135-
needs: spelling
136-
permissions:
137-
actions: read
138-
contents: read
139-
pull-requests: write
140-
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
141-
steps:
142-
- name: comment
143-
uses: check-spelling/check-spelling@cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c # v0.0.26
144-
with:
145-
checkout: true
146-
task: ${{ needs.spelling.outputs.followup }}

0 commit comments

Comments
 (0)