[PR #4529] [MERGED] Disable merging a WIP Pull request #17412

Closed
opened 2025-11-02 13:14:26 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4529
Author: @JulienTant
Created: 7/27/2018
Status: Merged
Merged: 8/13/2018
Merged by: @lafriks

Base: masterHead: add-wip-control-on-pr


📝 Commits (10+)

  • b51d021 prevent pull request to be merged when PR is a WIP
  • 4e04e18 add tests
  • 2950078 add helper to prepend WIP: in PR title
  • 864f795 regroup external imports
  • 195b413 move default wip prefixes into settings
  • eaadddd use configurable WIP prefixes in javascript and default to first one in templates
  • f150a20 add documentation
  • 45732db add unit test on pull model
  • f146aea Merge branch 'master' into add-wip-control-on-pr
  • 404541a typo

📊 Changes

16 files changed (+218 additions, -5 deletions)

View changed files

📝 custom/conf/app.ini.sample (+4 -0)
📝 docs/content/doc/advanced/config-cheat-sheet.en-us.md (+4 -0)
docs/content/doc/usage/pull-request.en-us.md (+31 -0)
📝 integrations/api_pull_test.go (+26 -0)
📝 integrations/pull_merge_test.go (+21 -0)
📝 models/pull.go (+32 -1)
📝 models/pull_test.go (+31 -0)
📝 modules/setting/defaults.go (+3 -2)
📝 modules/setting/setting.go (+14 -0)
📝 options/locale/locale_en-US.ini (+3 -0)
📝 public/js/index.js (+18 -0)
📝 routers/api/v1/repo/pull.go (+1 -1)
📝 routers/repo/issue.go (+2 -0)
📝 routers/repo/pull.go (+14 -0)
📝 templates/repo/issue/new_form.tmpl (+8 -1)
📝 templates/repo/issue/view_content/pull.tmpl (+6 -0)

📄 Description

image

This PR fixes #4453

The idea behind this pull request is that when the TITLE of the pull requests starts with [wip] or wip:, then the nobody can merge that pull request until the "wip" indicator is removed from the title

  • Disable the ability to merge when the PR contains the given prefixes in the UI
  • Disable the ability to merge when the PR contains the given prefixes in the API
  • Write tests
  • Find a way to inject settings in js
  • Add documentation

🔄 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/4529 **Author:** [@JulienTant](https://github.com/JulienTant) **Created:** 7/27/2018 **Status:** ✅ Merged **Merged:** 8/13/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `add-wip-control-on-pr` --- ### 📝 Commits (10+) - [`b51d021`](https://github.com/go-gitea/gitea/commit/b51d02148c3ba03bd8691080a9f3e06e421298bc) prevent pull request to be merged when PR is a WIP - [`4e04e18`](https://github.com/go-gitea/gitea/commit/4e04e186bd593e13bbba2f73c4b5093e8da1416d) add tests - [`2950078`](https://github.com/go-gitea/gitea/commit/2950078d8ff5360558db9e23067822fd4697034c) add helper to prepend WIP: in PR title - [`864f795`](https://github.com/go-gitea/gitea/commit/864f795c508043a621435cd48227f81fb54578a9) regroup external imports - [`195b413`](https://github.com/go-gitea/gitea/commit/195b413e999d2d32ce646f568b044e8dfa8e4b75) move default wip prefixes into settings - [`eaadddd`](https://github.com/go-gitea/gitea/commit/eaadddd72faca234dcde3c6089c764b9e21a8c3b) use configurable WIP prefixes in javascript and default to first one in templates - [`f150a20`](https://github.com/go-gitea/gitea/commit/f150a2056d787f2932ad809c0cf2a72c4f7079e1) add documentation - [`45732db`](https://github.com/go-gitea/gitea/commit/45732db95d63ad8e1392df094984a2c064c9403d) add unit test on pull model - [`f146aea`](https://github.com/go-gitea/gitea/commit/f146aeaad7722d813c5e88eb2a5b3bc91849c4a8) Merge branch 'master' into add-wip-control-on-pr - [`404541a`](https://github.com/go-gitea/gitea/commit/404541a6b28c2011e3bfa4b72e5aff35e3ab7f60) typo ### 📊 Changes **16 files changed** (+218 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `custom/conf/app.ini.sample` (+4 -0) 📝 `docs/content/doc/advanced/config-cheat-sheet.en-us.md` (+4 -0) ➕ `docs/content/doc/usage/pull-request.en-us.md` (+31 -0) 📝 `integrations/api_pull_test.go` (+26 -0) 📝 `integrations/pull_merge_test.go` (+21 -0) 📝 `models/pull.go` (+32 -1) 📝 `models/pull_test.go` (+31 -0) 📝 `modules/setting/defaults.go` (+3 -2) 📝 `modules/setting/setting.go` (+14 -0) 📝 `options/locale/locale_en-US.ini` (+3 -0) 📝 `public/js/index.js` (+18 -0) 📝 `routers/api/v1/repo/pull.go` (+1 -1) 📝 `routers/repo/issue.go` (+2 -0) 📝 `routers/repo/pull.go` (+14 -0) 📝 `templates/repo/issue/new_form.tmpl` (+8 -1) 📝 `templates/repo/issue/view_content/pull.tmpl` (+6 -0) </details> ### 📄 Description ![image](https://user-images.githubusercontent.com/785518/43348854-84cab582-91fc-11e8-9031-6bb99e382ac1.png) This PR fixes #4453 The idea behind this pull request is that when the TITLE of the pull requests starts with `[wip]` or `wip:`, then the nobody can merge that pull request until the "wip" indicator is removed from the title - [x] Disable the ability to merge when the PR contains the given prefixes in the UI - [x] Disable the ability to merge when the PR contains the given prefixes in the API - [x] Write tests - [x] Find a way to inject settings in js - [x] Add documentation --- <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 13:14:28 -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#17412