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:
Earl Warren 2024-08-08 09:46:38 +02:00
parent a83f5cd0f0
commit cfefe2b6c9
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
9 changed files with 25 additions and 15 deletions

View file

@ -70,7 +70,7 @@ func TestPullrequestReopen(t *testing.T) {
require.NoError(t, err)
// Create an head repository.
headRepo, err := repo_service.ForkRepository(git.DefaultContext, user2, org26, repo_service.ForkRepoOptions{
headRepo, err := repo_service.ForkRepositoryAndUpdates(git.DefaultContext, user2, org26, repo_service.ForkRepoOptions{
BaseRepo: baseRepo,
Name: "reopen-head",
})