-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
release: too many authors in authors section #26949
Comments
Hi, I was having the same issue, after debugging locally, I found out the culprit: In the
Here is a patch that solves the issue: diff --git a/release/changelog-renderer/index.js b/release/changelog-renderer/index.js
index 5b2f41a880933f41856de81b11453c9b27efa733..f4bb0609a3c155fd0dcddfcb6393d888c06cd76c 100644
--- a/release/changelog-renderer/index.js
+++ b/release/changelog-renderer/index.js
@@ -25,10 +25,13 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
}
}
+
+ let relevantChanges = [];
// workspace root level changelog
if (project === null) {
+ relevantChanges = changes;
// No changes for the workspace
- if (changes.length === 0) {
+ if (relevantChanges.length === 0) {
if (dependencyBumps?.length) {
applyAdditionalDependencyBumps({
markdownLines,
@@ -42,7 +45,7 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
return markdownLines.join('\n').trim();
}
- const typeGroups = groupBy(changes, 'type');
+ const typeGroups = groupBy(relevantChanges, 'type');
markdownLines.push('', createVersionTitle(releaseVersion, changelogRenderOptions), '');
for (const type of Object.keys(changeTypes)) {
const group = typeGroups[type];
@@ -75,7 +78,7 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
else {
// project level changelog
- const relevantChanges = changes.filter((c) => c.affectedProjects &&
+ relevantChanges = changes.filter((c) => c.affectedProjects &&
(c.affectedProjects === '*' || c.affectedProjects.includes(project)));
// Generating for a named project, but that project has no relevant changes in the current set of commits, exit early
if (relevantChanges.length === 0) {
@@ -128,7 +131,7 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
if (changelogRenderOptions.authors) {
const _authors = new Map();
- for (const change of changes) {
+ for (const change of relevantChanges) {
if (!change.author) {
continue;
} I will try to push a PR, once I manage to have my devcontainer setup working again |
Thanks folks, this will be addressed by #27181 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I did small change in one of my libraries, and trying to publish it with
nx release
, and it generates changelog with too many authors, not relevant to my changes. Sometimes it includes wierd commit sha.Expected Behavior
Only authors of specific commits that described in changelog should be in authors
GitHub Repo
No response
Steps to Reproduce
Don't know exactly how to reproduce, but I think the problem in
changelog-renderer
: when generating authors, it uses allchanges
but for changelog it usesrelevantChanges
Nx Report
Failure Logs
No response
Package Manager Version
9.8.1
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: