Add more detail to fork failure message
This commit is contained in:
parent
f015020bcd
commit
39215d9316
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
// 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.
|
// actually took place. Ensure that we raise an error instead.
|
||||||
if ghrepo.IsSame(repo, newRepo) {
|
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
|
return newRepo, nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue