From 39215d9316ce6733690b08761aebc3715456fef5 Mon Sep 17 00:00:00 2001 From: Chris Roat <1053153+chrisroat@users.noreply.github.com> Date: Tue, 23 Jan 2024 07:28:05 -0800 Subject: [PATCH] Add more detail to fork failure message --- api/queries_repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/queries_repo.go b/api/queries_repo.go index ba94edef1..90822d6aa 100644 --- a/api/queries_repo.go +++ b/api/queries_repo.go @@ -548,7 +548,7 @@ func ForkRepo(client *Client, repo ghrepo.Interface, org, newName string, defaul // The GitHub API will happily return a HTTP 200 when attempting to fork own repo even though no forking // actually took place. Ensure that we raise an error instead. if ghrepo.IsSame(repo, newRepo) { - return newRepo, fmt.Errorf("%s cannot be forked", ghrepo.FullName(repo)) + return newRepo, fmt.Errorf("%s cannot be forked to same owner or organization", ghrepo.FullName(repo)) } return newRepo, nil