Suppress push comment for open PRs
Introduced in v0.0.20
Background
The design of check-spelling is such that if you push to a branch, you get instant feedback.
This is great, since it means you can fix otherwise embarrassing typos before you make a PR.
In order for a repository to reject additional typos, it needs to use pull_request or pull_request_target.
The latter is recommended for various reasons.
Unfortunately, if both are active, then one naturally receives duplicate comments.
Solution
GitHub makes it possible to look for PRs associated with branches, so we check to see
if there's an open PR corresponding with the branch, if so, we cancel the push
check.
Deployment
with:
suppress_push_for_open_pull_request: 1
Rendering
You'll see something like:
⏭️ Workflow skipped
See check-spelling pull_request_target workflow (.github/workflows/spelling.yml) in PR #1.
https://github.com/check-spelling-sandbox/miniature-octo-spoon/pull/1/checks
The links should take you to the relevant pull request and enable you to reason through the checks.
FAQ | Showcase | Event descriptions | Configuration information | Known Issues | Possible features | Deprecations | Release notes | Helpful scripts