googleapis / release-please

generate release PRs based on the conventionalcommits.org spec
https://www.conventionalcommits.org
Apache License 2.0
4.9k stars 368 forks source link

Monorepo: Avoid creating empty PR #2384

Open gvillo opened 1 month ago

gvillo commented 1 month ago

Is your feature request related to a problem? Please describe. Kinda! We have a monorepo and it's creating a PR for the root (I guess) named chore: release main with 0 files on it.

I have the following release-please-config.json

{
    "include-component-in-tag": true,
    "include-v-in-tag": false,
    "tag-separator": "@",
    "separate-pull-requests": true,
    "pull-request-footer": "Al mergear esto va a deployar a PROD!",
    "packages": {
        "apps/web1": {
            "component": "@app/web1",
            "release-type": "node"
        },
        "apps/web2": {
            "component": "@app/web2",
            "release-type": "node"
        },
        "packages/sdk-js": {
            "component": "@pkg/sdk",
            "release-type": "node"
        }
    },
    "plugins": [
        {
            "type": "node-workspace",
            "updatePeerDependencies": true
        }
    ],
    "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

I don't understand the reason that it's creating that empty PR if there is no "." packages in release-please-config.json file.

A clear and concise description of what you want to happen.

If there is no "." entry declared, it should create a PR for the root package.json.

Add any other context or screenshots about the feature request here. image

treyturner commented 1 month ago

I'm new to this action and spent way too much time trying to figure out what I was doing wrong to cause this.