1
0
Fork 0
forked from forgejo/forgejo

Add Pull Request merge options - Ignore white-space for conflict checking, Rebase, Squash merge (#3188)

* Pull request options migration and UI in settings

* Add ignore whitespace functionality

* Fix settings if pull requests are disabled

* Fix migration transaction

* Merge with Rebase functionality

* UI changes and related functionality for pull request merging button

* Implement squash functionality

* Fix rebase merging

* Fix pull request merge tests

* Add squash and rebase tests

* Fix API method to reuse default message functions

* Some refactoring and small fixes

* Remove more hardcoded values from tests

* Remove unneeded check from API method

* Fix variable name and comment typo

* Fix reset commit count after PR merge
This commit is contained in:
Lauris BH 2018-01-05 20:56:50 +02:00 committed by GitHub
parent a192f3052e
commit 8ac1501ad7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 529 additions and 44 deletions

View file

@ -477,7 +477,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Combo("").Get(repo.GetPullRequest).
Patch(reqToken(), reqRepoWriter(), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
m.Combo("/merge").Get(repo.IsPullRequestMerged).
Post(reqToken(), reqRepoWriter(), repo.MergePullRequest)
Post(reqToken(), reqRepoWriter(), bind(auth.MergePullRequestForm{}), repo.MergePullRequest)
})
}, mustAllowPulls, context.ReferencesGitRepo())