[PR #3188] [MERGED] Add Pull Request merge options - Ignore white-space for conflict checking, Rebase, Squash merge #16819

Closed
opened 2025-11-02 12:19:49 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3188
Author: @lafriks
Created: 12/13/2017
Status: Merged
Merged: 1/5/2018
Merged by: @lafriks

Base: masterHead: feat/add_pr_merge_options


📝 Commits (10+)

  • 4877095 Pull request options migration and UI in settings
  • cec0e5b Add ignore whitespace functionality
  • 2f290af Fix settings if pull requests are disabled
  • 9cceefc Fix migration transaction
  • 640fc93 Merge with Rebase functionality
  • 8524896 UI changes and related functionality for pull request merging button
  • 204f042 Implement squash functionality
  • db1cf2f Fix rebase merging
  • d90ebd6 Fix pull request merge tests
  • ee9995b Add squash and rebase tests

📊 Changes

20 files changed (+529 additions, -44 deletions)

View changed files

📝 integrations/pull_merge_test.go (+33 -4)
📝 integrations/repo_activity_test.go (+2 -1)
📝 models/error.go (+17 -0)
📝 models/fixtures/repo_unit.yml (+2 -2)
📝 models/migrations/migrations.go (+2 -0)
models/migrations/v54.go (+57 -0)
📝 models/pull.go (+122 -16)
📝 models/repo.go (+5 -0)
📝 models/repo_unit.go (+30 -4)
📝 modules/auth/repo_form.go (+23 -0)
📝 options/locale/locale_en-US.ini (+9 -0)
📝 public/js/index.js (+22 -0)
📝 routers/api/v1/api.go (+1 -1)
📝 routers/api/v1/repo/pull.go (+26 -2)
📝 routers/repo/issue.go (+20 -0)
📝 routers/repo/pull.go (+29 -2)
📝 routers/repo/setting.go (+6 -1)
📝 routers/routes/routes.go (+1 -1)
📝 templates/repo/issue/view_content/pull.tmpl (+93 -8)
📝 templates/repo/settings/options.tmpl (+29 -2)

📄 Description

Fixes #712

Add Pull Request merge options:

  • Ignore whitespaces when checking conflicts
  • Allow merge
  • Allow rebase
  • Allow squash

Tasks:

  • Add config to Pull Request unit
  • Add migration to set defaults
  • Add UI and functionality in Settings section
  • Add ignore whitespace functionality
  • UI changes for merge PR button
  • Add rebase functionality
  • Add squash functionality
  • Add tests
    Fix wrong display of merged PR commits and changes - should be implemented as separate PR (issue #3222)

Screenshots:
attels

attels

attels

attels

attels


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3188 **Author:** [@lafriks](https://github.com/lafriks) **Created:** 12/13/2017 **Status:** ✅ Merged **Merged:** 1/5/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `feat/add_pr_merge_options` --- ### 📝 Commits (10+) - [`4877095`](https://github.com/go-gitea/gitea/commit/487709544f4fa23c11c535bf661636cf657d3ceb) Pull request options migration and UI in settings - [`cec0e5b`](https://github.com/go-gitea/gitea/commit/cec0e5b3740666fd25366c47bddfc038415496a6) Add ignore whitespace functionality - [`2f290af`](https://github.com/go-gitea/gitea/commit/2f290afef5f247f35d9b87c1d1999ad31fad1f9f) Fix settings if pull requests are disabled - [`9cceefc`](https://github.com/go-gitea/gitea/commit/9cceefc9189feea2b358474c2f3b8f21ca74f5da) Fix migration transaction - [`640fc93`](https://github.com/go-gitea/gitea/commit/640fc93dea673089634c289c080f82b017913e1a) Merge with Rebase functionality - [`8524896`](https://github.com/go-gitea/gitea/commit/8524896e4beb71af08893cc3da23cd6a6312d1ee) UI changes and related functionality for pull request merging button - [`204f042`](https://github.com/go-gitea/gitea/commit/204f0428e0c136f7f3a2d5d4c8b7a7aa33d8bbd3) Implement squash functionality - [`db1cf2f`](https://github.com/go-gitea/gitea/commit/db1cf2f57d083d29ea02fc990d2cf77f595b2057) Fix rebase merging - [`d90ebd6`](https://github.com/go-gitea/gitea/commit/d90ebd69a2a8133ebc083e48fa02b27f86125eb2) Fix pull request merge tests - [`ee9995b`](https://github.com/go-gitea/gitea/commit/ee9995bc7c024016dfddaab681a4477aa7e37899) Add squash and rebase tests ### 📊 Changes **20 files changed** (+529 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `integrations/pull_merge_test.go` (+33 -4) 📝 `integrations/repo_activity_test.go` (+2 -1) 📝 `models/error.go` (+17 -0) 📝 `models/fixtures/repo_unit.yml` (+2 -2) 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v54.go` (+57 -0) 📝 `models/pull.go` (+122 -16) 📝 `models/repo.go` (+5 -0) 📝 `models/repo_unit.go` (+30 -4) 📝 `modules/auth/repo_form.go` (+23 -0) 📝 `options/locale/locale_en-US.ini` (+9 -0) 📝 `public/js/index.js` (+22 -0) 📝 `routers/api/v1/api.go` (+1 -1) 📝 `routers/api/v1/repo/pull.go` (+26 -2) 📝 `routers/repo/issue.go` (+20 -0) 📝 `routers/repo/pull.go` (+29 -2) 📝 `routers/repo/setting.go` (+6 -1) 📝 `routers/routes/routes.go` (+1 -1) 📝 `templates/repo/issue/view_content/pull.tmpl` (+93 -8) 📝 `templates/repo/settings/options.tmpl` (+29 -2) </details> ### 📄 Description Fixes #712 Add Pull Request merge options: * Ignore whitespaces when checking conflicts * Allow merge * Allow rebase * Allow squash Tasks: - [x] Add config to Pull Request unit - [x] Add migration to set defaults - [x] Add UI and functionality in Settings section - [x] Add ignore whitespace functionality - [x] UI changes for merge PR button - [x] Add rebase functionality - [x] Add squash functionality - [x] Add tests ~~Fix wrong display of merged PR commits and changes~~ - should be implemented as separate PR (issue #3222) Screenshots: ![attels](https://user-images.githubusercontent.com/165205/33967320-a1d299bc-e06b-11e7-8d81-bf742b199209.png) ![attels](https://user-images.githubusercontent.com/165205/34081195-720e5fe2-e352-11e7-9b45-743aea9d0e09.png) ![attels](https://user-images.githubusercontent.com/165205/34081208-87b49bb8-e352-11e7-9084-8d6ec0b98393.png) ![attels](https://user-images.githubusercontent.com/165205/34081226-9b3cb256-e352-11e7-8502-865672ffe0f7.png) ![attels](https://user-images.githubusercontent.com/165205/34081231-b56f269a-e352-11e7-946e-f71aa77f2c9d.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:19:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16819