diff --git a/.changeset/quick-ligers-flash.md b/.changeset/quick-ligers-flash.md new file mode 100644 index 00000000..a0441203 --- /dev/null +++ b/.changeset/quick-ligers-flash.md @@ -0,0 +1,5 @@ +--- +"changesets-gitlab": minor +--- + +feat: ignore private or ignored packages for comment diff --git a/src/get-changed-packages.ts b/src/get-changed-packages.ts index ec2c457d..c7506527 100644 --- a/src/get-changed-packages.ts +++ b/src/get-changed-packages.ts @@ -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, ) @@ -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, } }