Skip to content

Commit

Permalink
feat: ignore private or ignored packages for comment (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin authored May 11, 2023
1 parent 567c77a commit 6edb926
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-ligers-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"changesets-gitlab": minor
---

feat: ignore private or ignored packages for comment
14 changes: 12 additions & 2 deletions src/get-changed-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,14 @@ export const getChangedPackages = async ({
throw new Error('an error occurred when fetching files')
}

const config = await configPromise.then(rawConfig =>
parseConfig(rawConfig, packages),
)

const releasePlan = assembleReleasePlan(
await Promise.all(changesetPromises),
packages,
await configPromise.then(rawConfig => parseConfig(rawConfig, packages)),
config,
await preStatePromise,
)

Expand All @@ -194,7 +198,13 @@ export const getChangedPackages = async ({
: packages.packages.filter(pkg =>
changedFiles.some(changedFile => changedFile.includes(pkg.dir)),
)
).map(x => x.packageJson.name),
)
.filter(
pkg =>
pkg.packageJson.private !== true &&
!config.ignore.includes(pkg.packageJson.name),
)
.map(x => x.packageJson.name),
releasePlan,
}
}

0 comments on commit 6edb926

Please sign in to comment.