googleapis / googleapis/release-please-action

Non-default Branch - Error creating Pull Request: Reference update failed

Open
#997 2 comments 0 reactions 0 assignees View on GitHub
priority: p2 type: bug
Dominant language
TypeScript
Stars
2.5k
Forks
327
PR merge metrics
No merged PRs in 30d

Description

#### Environment details

- Programming language: yml
- OS: ubuntu-latest
- Package version: v4

#### Steps to reproduce

1. Create a repo with two branches main and release.
2. Set release as the default branch.
3. Create a release workflow similar like
```
name: Release

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release:
name: 'Release'
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
target-branch: main
```
4. Create a branch off of release, make a change, push a commit, and merge a PR into release.
5. Create a PR and merge into main.
6. Navigate to the Actions tab and open the workflow run for the release.
7. Click on the Release job and expand the relevant step.

#### Expected Results

When looking at the logs, you should see `Successfully created branch at` and the workflow should have successfully run

#### Actual Results

The logs display the following errors and the workflow fails:
```
Error when creating branch
RequestError [HttpError]: Error creating Pull Request: Reference update failed
422
```

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.