mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-11 22:49:17 +02:00
chore(refactor): split repo_service.ForkRepository in two
ForkRepository performs two different functions: * The fork itself, if it does not already exist * Updates and notifications after the fork is performed The function is split to reflect that and otherwise unmodified. The two function are given different names to: * clarify which integration tests provides coverage * distinguish it from the notification method by the same name
This commit is contained in:
parent
a83f5cd0f0
commit
cfefe2b6c9
9 changed files with 25 additions and 15 deletions
|
@ -155,7 +155,7 @@ func (o *project) Put(ctx context.Context) generic.NodeID {
|
|||
panic(fmt.Errorf("LoadOwner %v %w", o.forgejoProject.BaseRepo, err))
|
||||
}
|
||||
|
||||
repo, err := repo_service.ForkRepository(ctx, doer, owner, repo_service.ForkRepoOptions{
|
||||
repo, err := repo_service.ForkRepositoryIfNotExists(ctx, doer, owner, repo_service.ForkRepoOptions{
|
||||
BaseRepo: o.forgejoProject.BaseRepo,
|
||||
Name: o.forgejoProject.Name,
|
||||
Description: o.forgejoProject.Description,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue