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

ReleaseTooling: Exclude links to contributors' user profiles from changelog #26257

Merged
merged 2 commits into from
Mar 6, 2024
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
4 changes: 1 addition & 3 deletions scripts/release/generate-pr-description.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import chalk from 'chalk';
import program from 'commander';
import { z } from 'zod';
Expand Down Expand Up @@ -65,7 +64,6 @@ export const mapToChangelist = ({
}): string => {
return changes
.filter((change) => {
// eslint-disable-next-line no-restricted-syntax
for (const titleToIgnore of CHANGE_TITLES_TO_IGNORE) {
if (change.title?.match(titleToIgnore)) {
return false;
Expand Down Expand Up @@ -227,7 +225,7 @@ export const generateNonReleaseDescription = (
- Merge this PR
- [Follow the run of the publish action](https://github.com/storybookjs/storybook/actions/workflows/publish.yml)`
// don't mention contributors in the release PR, to avoid spamming them
.replaceAll('[@', '[@ ')
.replaceAll('@', '')
.replaceAll('"', '\\"')
.replaceAll('`', '\\`')
.replaceAll("'", "\\'")
Expand Down
9 changes: 4 additions & 5 deletions scripts/release/utils/get-changes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import chalk from 'chalk';
import semver from 'semver';
import type { PullRequestInfo } from './get-github-info';
Expand Down Expand Up @@ -206,11 +205,11 @@ export const getChangelogText = ({
return entry.labels?.some((label) => Object.keys(RELEASED_LABELS).includes(label));
})
.map((entry) => {
const { title, links } = entry;
const { pull, commit, user } = links;
const { title, user, links } = entry;
const { pull, commit } = links;
return pull
? `- ${title} - ${pull}, thanks ${user}!`
: `- ⚠️ _Direct commit_ ${title} - ${commit} by ${user}`;
? `- ${title} - ${pull}, thanks @${user}!`
: `- ⚠️ _Direct commit_ ${title} - ${commit} by @${user}`;
})
.sort();
const text = [heading, '', ...formattedEntries].join('\n');
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/utils/get-github-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function makeQuery(repos: ReposWithCommitsAndPRsToFetch) {
nodes {
name
}
}
}
mergeCommit {
commitUrl
oid
Expand Down
Loading