Cali0707 / git-utils

A collection of useful git tools
Apache License 2.0
3 stars 2 forks source link

Auto create fork repo with GitHub API #17

Open Leo6Leo opened 11 months ago

Leo6Leo commented 11 months ago

https://github.com/Cali0707/git-utils/blob/d997ab1d94660873c6b68bdf6d5da098b99fc0fe/README.md?plain=1#L27

https://docs.github.com/en/rest/repos/forks?apiVersion=2022-11-28#create-a-fork

And allowing git clonefork to detect, if the link provided is connected to a repo that is not created by the current user, we will automatically create a fork repo for them and do the remote config.

If the link provided is connected to a repo that is created by the current user, we will only do the remote config. e.g: git clonefork <upstream> will create the fork repo in my account git clonefork <Leo6Leo/reponame> will not create the fork repo

Cali0707 commented 11 months ago

👍 @Leo6Leo great idea!!

Cali0707 commented 11 months ago

@Leo6Leo I'm curious, do you think we should be supporting the interaction git clonefork <reponame> and/or git clonefork <owner/reponame> as well as/instead of git clonefork <repourl>?