File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 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
935935already_forked = You' ve already forked %s
936936fork_to_different_account = Fork to a different account
937937fork_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.
938939use_template = Use this template
939940clone_in_vsc = Clone in VS Code
940941download_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 {
174174 ctx .Data ["ContextUser" ] = ctx .Doer
175175 } else if len (orgs ) > 0 {
176176 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
177183 }
178184
179185 return forkRepo
You can’t perform that action at this time.
0 commit comments