googleapis / googleapis/release-please-action

Doubling PRs when config has `draft: true`

Open
#1,111 2 comments 7 reactions 1 assignee Claimed by @chingor13 View on GitHub
priority: p2 type: bug
Dominant language
TypeScript
Stars
2.5k
Forks
327
PR merge metrics
No merged PRs in 30d

Description

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"
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.