Skip to content

Commit

Permalink
fix: address bug with CHANGELOG generation
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Mar 23, 2021
1 parent 4a1a1ea commit 4744798
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions __snapshots__/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ filename: CHANGELOG.md
### ⚠ BREAKING CHANGES
* **@node/pkg1:** major new feature
* **@node/pkg2:** major new feature
### Features
* **@node/pkg1:** major new feature ([e3ab0ab](https://github.com/fake/repo/commit/e3ab0abfd66e66324f685ceeececf35c))
* **@node/pkg2:** major new feature ([72f962d](https://github.com/fake/repo/commit/72f962d44ba0bcee15594ea6bdc67d8b))
filename: package.json
Expand Down Expand Up @@ -114,10 +116,12 @@ googleapis: 3.0.0
### ⚠ BREAKING CHANGES
* **@node/pkg1:** major new feature
* **@node/pkg2:** major new feature
### Features
* **@node/pkg1:** major new feature ([e3ab0ab](https://github.com/fake/repo/commit/e3ab0abfd66e66324f685ceeececf35c))
* **@node/pkg2:** major new feature ([72f962d](https://github.com/fake/repo/commit/72f962d44ba0bcee15594ea6bdc67d8b))
---
Expand Down
6 changes: 3 additions & 3 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class Manifest {
}

protected async getPackagesToRelease(
commits: Commit[],
allCommits: Commit[],
sha?: string
): Promise<PackageReleaseData[]> {
const packages = (await this.getConfigJson()).parsedPackages;
Expand All @@ -288,14 +288,14 @@ export class Manifest {
includeEmpty: true,
packagePaths: packages.map(p => p.path),
});
const commitsPerPath = cs.split(commits);
const commitsPerPath = cs.split(allCommits);
const packagesToRelease: Record<string, PackageReleaseData> = {};
const missingVersionPaths = [];
const defaultBranch = await this.gh.getDefaultBranch();
for (const pkg of packages) {
// The special path of '.' indicates the root module is being released
// in this case, use the entire list of commits:
commits = pkg.path === '.' ? commits : commitsPerPath[pkg.path];
const commits = pkg.path === '.' ? allCommits : commitsPerPath[pkg.path];
if (!commits || commits.length === 0) {
continue;
}
Expand Down

0 comments on commit 4744798

Please sign in to comment.