diff --git a/README.md b/README.md
index fb9ac5ef..2964a7ea 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,7 @@ npx changelogen@latest [...args] [--dir
]
- `--preminor`: Bump as a semver-preminor version, can set id with string.
- `--prepatch`: Bump as a semver-prepatch version, can set id with string.
- `--prerelease`: Bump as a semver-prerelease version, can set id with string.
+- `--hideAuthorEmail`: Do not include author email in changelog if github username cannot be found.
### `changelogen gh release`
diff --git a/src/config.ts b/src/config.ts
index 7b6359f2..f650dd00 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -27,6 +27,7 @@ export interface ChangelogConfig {
tagBody?: string;
};
excludeAuthors: string[];
+ hideAuthorEmail?: boolean;
}
export type ResolvedChangelogConfig = Omit & {
diff --git a/src/markdown.ts b/src/markdown.ts
index 6fd3c890..8a15a0d7 100644
--- a/src/markdown.ts
+++ b/src/markdown.ts
@@ -94,7 +94,8 @@ export async function generateMarkDown(
const _email = [...i.email].find(
(e) => !e.includes("noreply.github.com")
);
- const email = _email ? `<${_email}>` : "";
+ const email =
+ config.hideAuthorEmail !== true && _email ? `<${_email}>` : "";
const github = i.github
? `([@${i.github}](https://github.com/${i.github}))`
: "";