Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/guides/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ To require a company address:
author_email_pattern = "^.+@example\\.com$"
```

To refuse GitHub's no-reply addresses, which cannot receive mail and can lose
their link to the author's account after a username change:

```toml title="cchk.toml"
[commit]
author_email_pattern = '(?i)^(?!.*@users\.noreply\.github\.com$).+@.+$'
```

### Bots

Automation cannot meaningfully sign the DCO, and forcing it to produces
Expand Down
10 changes: 10 additions & 0 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,16 @@ git config --global user.email you@example.com
`^.+@.+$`; set something like `"^.+@example\\.com$"` to require a company
domain.

To reject an address instead of requiring one, use a negative lookahead. This
refuses GitHub's no-reply addresses (`jane@users.noreply.github.com` and
`12345+jane@users.noreply.github.com`), which cannot receive mail and can
lose their link to the author's account after a GitHub username change:

```toml title="cchk.toml"
[commit]
author_email_pattern = '(?i)^(?!.*@users\.noreply\.github\.com$).+@.+$'
```
Comment thread
shenxianpeng marked this conversation as resolved.
Resolved

!!! note

Because the built-in pattern only looks for an `@`, local and placeholder
Expand Down