googleapis / googleapis/release-please

More than one push to the release branch

Open
#2,540 0 comments 0 reactions 1 assignee Claimed by @chingor13 View on GitHub
priority: p3 type: bug
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

#### Environment details

- `release-please` version: 16.18.0

#### Steps to reproduce

1. Create a repository with a `main` branch as default branch and relevant commits (latest commit sha1 is `abc1`, but no existing `release-please--branches--main` branch yet.
2. Add a GitHub Actions workflow to the repository that triggers `on: push`.
3. Run `release-please release-pr` on this repository - the `release-please--branches--main` will be created (sha1 `cdef2`)

#### Expectation
* The `release-please--branches--main` branch is created with a single push, containing all relevant changes (`cdef2`), causing an `on: push` trigger to only get triggered once.

#### Observation
* The `release-please--branches--main` branch is first pushed with the same sha1 as `main` (`abc1`), triggering a workflow run for the content that was already built on `main`.
* Then the release modifications are pushed to the branch (`cdef2`), triggering a second workflow run with the actually relevant changes.

While the issue can be avoided by using a different / more specific trigger, I would really like to stick with `on: push`.

Would it be possible to join the creation and modification into a single operation? (I'm not sure how release-please prepares / performs the changes ... If it uses direct GitHub API calls instead of a local workspace, it might not be feasible without a bigger rework?)

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.