mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-30 13:44:36 -04: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
|
@ -376,7 +376,7 @@ func TestPullView_CodeOwner(t *testing.T) {
|
|||
|
||||
t.Run("Forked Repo Pull Request", func(t *testing.T) {
|
||||
user5 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 5})
|
||||
forkedRepo, err := repo_service.ForkRepository(db.DefaultContext, user2, user5, repo_service.ForkRepoOptions{
|
||||
forkedRepo, err := repo_service.ForkRepositoryAndUpdates(db.DefaultContext, user2, user5, repo_service.ForkRepoOptions{
|
||||
BaseRepo: repo,
|
||||
Name: "test_codeowner_fork",
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue