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

Allow customization of contributor greeting #194

Open
wants to merge 2 commits 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
2 changes: 1 addition & 1 deletion src/utils/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function getChangeLogSection(
.filter((v, i, a) => a.indexOf(v) === i)
.filter((c) => !c.endsWith('[bot]'));
if (authors.length > 0) {
const contributors = `### ❤️ Thanks to all contributors! ❤️\n\n${authors.join(', ')}`;
const contributors = `${config.user.releaseContributorGreeting}\n\n${authors.join(', ')}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#197 uses the plugin settings both options should be consistent as they are pretty similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a user setting fits better here. #197 doesn't use it as it isn't (easily) possible the way the code is composed right now.

section += `${contributors}\n\n`;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const defaultUserConfig: UserConfig = {
skipLabels: ['skip-release', 'skip-changelog', 'regression'],
skipCommitsWithoutPullRequest: true,
commentOnReleasedPullRequests: true,
releaseContributorGreeting: '### ❤️ Thanks to all contributors! ❤️',
};

export async function getConfig(): Promise<Config> {
Expand Down
6 changes: 6 additions & 0 deletions src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ export type UserConfig = Partial<{
* @default true
*/
commentOnReleasedPullRequests: boolean;

/**
* Set the release contributor greeting
* @default ### ❤️ Thanks to all contributors! ❤️
*/
releaseContributorGreeting: string;
}>;

export const defineConfig = (config: UserConfig) => config;