← Back to Blog

Safe Pull Request Now Targets the Default Branch (Finally)

2025-06-03by Andrew Weiner

📣 Safe Pull Request Now Targets the Default Branch (Finally)

When I first launched Safe Pull Request, the goal was simple: make it safer and easier to open pull requests from forks——especially when the original repository has been archived or abandoned.

But there was one obvious thing I overlooked.

The Missing Piece

Until now, the extension always assumed that the pull request should go to the main branch. This was... optimistic. GitHub allows maintainers to set any branch as the default: master, develop, mr-potato-head, you name it. And people do.

So when a user pointed out that their pull requests were going to the wrong branch, I kicked myself: Of course, the extension should always target the repo’s default branch.

The Fix

The latest version of Safe Pull Request now fetches and respects the repository’s default branch when opening a pull request. If the repo’s default branch is develop, that’s where the PR will go. If it’s production-final-v2-really-this-time, that’s fine too.

It Just Works™——even if your team’s branch naming strategy is held together with duct tape and coffee.

Thanks

This update wouldn’t have happened without user feedback. (Specifically: someone noticing what I should have thought of in the first place.) If you see something that seems off, or if you’re doing something unique and the extension doesn’t keep up, let me know!