summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorKyle Evans <kevans91@users.noreply.github.com>2021-08-28 03:37:14 -0500
committerGitHub <noreply@github.com>2021-08-28 16:37:14 +0800
commitcad70599a65894651d91ad230b57857a443a4d26 (patch)
tree81181d7a44f8dd3f15234ca4ec28b03f1ff4187b /integrations
parent19049413827b130809ffe249900a5c89ef8a90df (diff)
downloadgitea-cad70599a65894651d91ad230b57857a443a4d26.tar.gz
gitea-cad70599a65894651d91ad230b57857a443a4d26.zip
Refactor the fork service slightly to take ForkRepoOptions (#16744)
* Refactor the fork service slightly to take ForkRepoOptions This reduces the number of places we need to change if we want to add other options during fork time. Signed-off-by: Kyle Evans <kevans@FreeBSD.org> * Fix integrations and tests after ForkRepository refactor Signed-off-by: Kyle Evans <kevans@FreeBSD.org> * Update OldRepo -> BaseRepo Signed-off-by: Kyle Evans <kevans@FreeBSD.org> * gofmt pass Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Diffstat (limited to 'integrations')
-rw-r--r--integrations/pull_update_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/integrations/pull_update_test.go b/integrations/pull_update_test.go
index 2dc966316e..46a1e04b25 100644
--- a/integrations/pull_update_test.go
+++ b/integrations/pull_update_test.go
@@ -60,7 +60,11 @@ func createOutdatedPR(t *testing.T, actor, forkOrg *models.User) *models.PullReq
assert.NoError(t, err)
assert.NotEmpty(t, baseRepo)
- headRepo, err := repo_module.ForkRepository(actor, forkOrg, baseRepo, "repo-pr-update", "desc")
+ headRepo, err := repo_module.ForkRepository(actor, forkOrg, models.ForkRepoOptions{
+ BaseRepo: baseRepo,
+ Name: "repo-pr-update",
+ Description: "desc",
+ })
assert.NoError(t, err)
assert.NotEmpty(t, headRepo)