Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hide author email address via flag #247

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ npx changelogen@latest [...args] [--dir <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`: Just show the author's GitHub handle without the email address.

### `changelogen gh release`

Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface ChangelogConfig {
tagBody?: string;
};
excludeAuthors: string[];
hideAuthorEmail?: boolean;
}

export type ResolvedChangelogConfig = Omit<ChangelogConfig, "repo"> & {
Expand Down
2 changes: 1 addition & 1 deletion src/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ 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}))`
: "";
Expand Down