Today I Learned

A Hashrocket project

GitHub Closes PR's On Target Branch Deletion 🚪

This week, we discovered an interesting feature: when the target branch for PR is deleted, GitHub closes (permanently, from what I can tell) the PR. To observe this in action:

  1. Open a PR
  2. Delete the target branch
  3. GitHub closes the PR automatically and disables the select boxes to change the target branch

Delete your branches carefully; doing so could unintentionally close one or more PRs.