Use discover default branch to fix #2217

王权利请求将github/fork/koenpunt/gh-issue-2217合并到master

Created by: koenpunt

As the title says, using discover_default_branch to determine the root_ref

Fixes #2217 (closed)

合并请求报告