Skip to content

Commit

Permalink
Add more detail to fork failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroat authored and williammartin committed Jan 29, 2024
1 parent f015020 commit 39215d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/queries_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39215d9

Please sign in to comment.