File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -935,6 +935,7 @@ fork_from = Fork From
935
935
already_forked = You' ve already forked %s
936
936
fork_to_different_account = Fork to a different account
937
937
fork_visibility_helper = The visibility of a forked repository cannot be changed.
938
+ fork_no_valid_owners = This repository can not be forked because there are no valid owners.
938
939
use_template = Use this template
939
940
clone_in_vsc = Clone in VS Code
940
941
download_zip = Download ZIP
Original file line number Diff line number Diff line change @@ -174,6 +174,12 @@ func getForkRepository(ctx *context.Context) *repo_model.Repository {
174
174
ctx .Data ["ContextUser" ] = ctx .Doer
175
175
} else if len (orgs ) > 0 {
176
176
ctx .Data ["ContextUser" ] = orgs [0 ]
177
+ } else {
178
+ msg := ctx .Tr ("repo.fork_no_valid_owners" )
179
+ ctx .Data ["Flash" ] = ctx .Flash
180
+ ctx .Flash .Error (msg )
181
+ ctx .Data ["CanForkRepo" ] = false
182
+ return nil
177
183
}
178
184
179
185
return forkRepo
You can’t perform that action at this time.
0 commit comments