Skip to content

Pre-release pipeline fails: zero-diff force-push auto-closes PR #1160

@WilliamBerryiii

Description

@WilliamBerryiii

Description

After the stable 3.2.0 release, the pre-release pipeline fails because both release-prerelease-pr.yml and release-stable.yml use the GitHub API to force-push prerelease/next to the same SHA as main. GitHub detects the 0-diff and auto-closes the open pre-release PR, so the merge condition is never met.

Additionally, the reset-prerelease job in release-stable.yml runs git and gh commands without first checking out the repository, causing "not a git repository" errors.

Root Cause

The API-based ref manipulation (gh api PATCH/POST) updated the remote ref before a local commit existed, so the branch tip was identical to main.

Expected Behavior

The pre-release pipeline should create a version-bump commit that differs from main before pushing, ensuring the PR remains open and mergeable.

Observed Behavior

  • prerelease/next is force-pushed to the exact same SHA as main
  • GitHub auto-closes the PR due to zero diff
  • reset-prerelease job errors with "not a git repository"

Reproduction

Trigger a stable release followed by a pre-release pipeline run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions