Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tysonnero-ccm opened this issue May 15, 2024 · 1 comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@tysonnero-ccm
Copy link

tysonnero-ccm commented May 15, 2024

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
@tysonnero-ccm tysonnero-ccm added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 15, 2024
@tysonnero-ccm
Copy link
Author

tysonnero-ccm commented May 16, 2024

Turns out this has nothing to due with a non-default branch. It's probably an issue with some repo setup. The create reference GitHub API doesn't return error details, so there is no way to know the issue from the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant