Skip to content

Doubling PRs when config has draft: true #1111

@osztenkurden

Description

@osztenkurden

Situation:
When config file has draft: true, pushing or merging commits to main branch results in Release-Please PR created correctly, but after merging that PR, another one is being created automatically with bumped minor version, and a list of all commits on the main branch up to date. Removing draft: true fixes the issue, and extra PR does not happen, however I need to attach extra assets to the Release before it's live, to prevent automated notifications going out.

cd.yml:

name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

permissions:
  issues: write
  contents: write
  pull-requests: write

jobs:
  release-please:
    runs-on: ubuntu-latest
    outputs:
      release_created: ${{ steps.release-please.outputs.release_created }}
      tag_name: ${{ steps.release-please.outputs.tag_name }}
    if: github.ref == 'refs/heads/main'
    steps:
      - name: Create Release-Please PR
        uses: googleapis/release-please-action@v4
        id: release-please
        with:
          token: ${{secrets.GITHUB_TOKEN}}

release-please-config.json:

{
  "packages": {
    ".": {
      "changelog-path": "CHANGELOG.md",
      "release-type": "node",
      "bump-minor-pre-major": false,
      "bump-patch-for-minor-pre-major": false,
      "prerelease": false,
      "draft": true,
      "include-component-in-tag": false,
      "include-v-in-tag": false
    }
  },
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions