Skip to content

reconcile-repos.sh: branch reset auto-closes enrollment PRs #701

@ascerra

Description

@ascerra

What happens

ensure_branch() in reconcile-repos.sh force-resets the fullsend/onboard branch to the default branch tip before writing the updated shim. During the reset the branch momentarily has zero diff from main, causing GitHub to auto-close the existing enrollment PR. The subsequent write_shim_to_branch() pushes new content (branch is 1 commit ahead again), but GitHub does not reopen auto-closed PRs.

The script's gh pr list check then sees no open PR and may or may not successfully create a replacement, depending on timing and error handling.

What should happen

The branch update should avoid the zero-diff state. Options:

  • Write the updated shim content in the same commit as the branch reset (atomic update)
  • Detect and gh pr reopen auto-closed PRs after the push
  • Use git commit --amend or rebase instead of resetting to base then re-committing

Context

Observed during the v0.5.0 upgrade of fullsend-ai. The experiments enrollment PR (fullsend-ai/experiments#18) survived because its shim content differed enough to avoid the zero-diff window, but the fullsend enrollment PR (fullsend-ai/fullsend#696) was auto-closed and had to be manually reopened.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions