You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a793898
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+70-10Lines changed: 70 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
[](https://github.com/commit-check/commit-check-action/network/dependents)<!-- used by badge -->
| **Where it runs** | In your workflow, on the runner, after the push | On the contributor's machine, at `git commit` / `git push` | Hosted by commit-check; installed on the repository, no workflow file |
109
+
| **What it checks** | Every PR commit's message, plus the PR title, branch and author checks you enable; renders a job summary, annotations, a PR comment and the `result` output | Message (`commit-msg` stage), branch, author; tag, force-push and files (`pre-push`) — one commit at a time, before it exists | Every commit of a push or pull request: message, branch, author (the PR title only in squash mode); reported as one **Commit Check** check run per commit |
110
+
| **When to pick it** | You want enforcement in CI that a contributor cannot skip, per-rule outputs for later steps, or you run on GitHub Enterprise Server / need `CCHK_*` overrides | You want the fastest feedback and to stop bad commits before they are pushed; pair it with the Action, since hooks are opt-in | You want zero YAML and no Actions minutes, or feedback on [fork pull requests](docs/fork-pr-comments.md) without the Action's read-only-token limits |
111
+
112
+
Most teams pair the pre-commit hook (fast, local) with the Action (enforced):
113
+
the hook catches a bad message before it is pushed, and the Action is why CI
114
+
fails when a contributor did not install the hook.
115
+
69
116
## Used By
70
117
71
118
<p align="center">
@@ -133,9 +180,19 @@ jobs:
133
180
> [!NOTE]
134
181
> `pr-comments` is disabled by default.
135
182
>
136
-
> PR comments are skipped for pull requests from forked repositories. See
137
-
> [docs/fork-pr-comments.md](docs/fork-pr-comments.md) for details on how to enable
138
-
> this feature for fork contributions.
183
+
> PR comments are skipped for pull requests from forked repositories, whose
184
+
> `GITHUB_TOKEN` is read-only. Everything else still works there: the check
185
+
> status, the annotations and the job summary. See
186
+
> [Fork pull requests](docs/fork-pr-comments.md).
187
+
>
188
+
> **Dependabot pull requests** are not forks, but GitHub gives their
189
+
> `pull_request` runs a read-only `GITHUB_TOKEN` by default. The `permissions`
190
+
> key is honoured for them, so the `pull-requests: write` grant in the
191
+
> [usage example](#usage) is enough; without it the action logs a
192
+
> `::warning::` on the 403 and leaves the report in the job summary. Note that
193
+
> Actions secrets are not available in Dependabot-triggered runs. Adding
194
+
> `dependabot[bot]` to `ignore_authors` skips the checks for those PRs
195
+
> altogether.
139
196
>
140
197
> Note: write-access to pull-requests requires the `pull-requests: write` permission.
141
198
> See [usage example](#usage).
@@ -463,10 +520,13 @@ By default, commit-check-action handles this gracefully:
463
520
- A **notice is added to the Job Summary** explaining why and how to fix it
464
521
- The commit checks themselves **still run normally**
465
522
466
-
> **For most projects, this is sufficient** — contributors can see check results in the
467
-
> action Job Summary. But if you *must* have PR comments on fork contributions, see
468
-
> the **[Fork PR Comments](docs/fork-pr-comments.md)** documentation for
469
-
> two recommended approaches with ready-to-use workflow examples.
523
+
> **For most projects, this is sufficient** — a fork contributor already gets the red
524
+
> check, the per-finding annotations on their diff and the full report in the job
525
+
> summary. If you want feedback on the pull request itself, the
526
+
> [Commit Check GitHub App](https://github.com/marketplace/commit-check) posts a check
527
+
> run per commit with no workflow file (free on public repositories), or you can run
528
+
> this action on `pull_request_target`. Both are covered in
0 commit comments