aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/api_repo_edit_test.go
diff options
context:
space:
mode:
authorChris Copeland <chris@chrisnc.net>2024-02-12 14:37:23 -0800
committerGitHub <noreply@github.com>2024-02-12 23:37:23 +0100
commit47b59658629f47e0ac559559a305b867740cae9c (patch)
tree5bc0102a155565f1b813609082d9ae23712e0d65 /tests/integration/api_repo_edit_test.go
parentf9c3459831659d37fd885dd1a9db32dcf19420e4 (diff)
downloadgitea-47b59658629f47e0ac559559a305b867740cae9c.tar.gz
gitea-47b59658629f47e0ac559559a305b867740cae9c.zip
Add merge style `fast-forward-only` (#28954)
With this option, it is possible to require a linear commit history with the following benefits over the next best option `Rebase+fast-forward`: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes #24906
Diffstat (limited to 'tests/integration/api_repo_edit_test.go')
-rw-r--r--tests/integration/api_repo_edit_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/integration/api_repo_edit_test.go b/tests/integration/api_repo_edit_test.go
index c4fc2177b4..7de8910ee0 100644
--- a/tests/integration/api_repo_edit_test.go
+++ b/tests/integration/api_repo_edit_test.go
@@ -65,6 +65,7 @@ func getRepoEditOptionFromRepo(repo *repo_model.Repository) *api.EditRepoOption
allowRebase := false
allowRebaseMerge := false
allowSquash := false
+ allowFastForwardOnly := false
if unit, err := repo.GetUnit(db.DefaultContext, unit_model.TypePullRequests); err == nil {
config := unit.PullRequestsConfig()
hasPullRequests = true
@@ -73,6 +74,7 @@ func getRepoEditOptionFromRepo(repo *repo_model.Repository) *api.EditRepoOption
allowRebase = config.AllowRebase
allowRebaseMerge = config.AllowRebaseMerge
allowSquash = config.AllowSquash
+ allowFastForwardOnly = config.AllowFastForwardOnly
}
archived := repo.IsArchived
return &api.EditRepoOption{
@@ -92,6 +94,7 @@ func getRepoEditOptionFromRepo(repo *repo_model.Repository) *api.EditRepoOption
AllowRebase: &allowRebase,
AllowRebaseMerge: &allowRebaseMerge,
AllowSquash: &allowSquash,
+ AllowFastForwardOnly: &allowFastForwardOnly,
Archived: &archived,
}
}