-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Fork with Default Branch Only #6983
Conversation
Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Only a small but important detail about boolean type
f833800
to
e6d6427
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate of #
Fixes #6984
https://docs.github.com/en/rest/repos/forks?apiVersion=2022-11-28#create-a-fork includes a
default_branch_only
flag.Introduced: https://github.blog/changelog/2022-07-27-you-can-now-fork-a-repo-and-copy-only-the-default-branch/
The web interface for this looks like this:
Note that the default behavior (at least for me?) in the web interface is to use this flag. That'd be way too much of an api change for me to introduce here, so we're going with the default legacy behavior of
default_branch_only=false
(well, technically unset, which lets GitHub change the fork behavior server-side in the future).