aboutsummaryrefslogtreecommitdiffstats
path: root/custom
diff options
context:
space:
mode:
authorViktor Kuzmin <kvaster@gmail.com>2024-01-17 03:44:56 +0300
committerGitHub <noreply@github.com>2024-01-17 01:44:56 +0100
commit49eb16867728913d1eb2ced96e0b0b0a358f6ebe (patch)
tree7c0d5ca1e3fc35890e38085e7ca0eb1cdeddec0a /custom
parent9c869b10b5a15adc04c0b93a13d6c5fb2add1304 (diff)
downloadgitea-49eb16867728913d1eb2ced96e0b0b0a358f6ebe.tar.gz
gitea-49eb16867728913d1eb2ced96e0b0b0a358f6ebe.zip
Retarget depending pulls when the parent branch is deleted (#28686)
Sometimes you need to work on a feature which depends on another (unmerged) feature. In this case, you may create a PR based on that feature instead of the main branch. Currently, such PRs will be closed without the possibility to reopen in case the parent feature is merged and its branch is deleted. Automatic target branch change make life a lot easier in such cases. Github and Bitbucket behave in such way. Example: $PR_1$: main <- feature1 $PR_2$: feature1 <- feature2 Currently, merging $PR_1$ and deleting its branch leads to $PR_2$ being closed without the possibility to reopen. This is both annoying and loses the review history when you open a new PR. With this change, $PR_2$ will change its target branch to main ($PR_2$: main <- feature2) after $PR_1$ has been merged and its branch has been deleted. This behavior is enabled by default but can be disabled. For security reasons, this target branch change will not be executed when merging PRs targeting another repo. Fixes #27062 Fixes #18408 --------- Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'custom')
-rw-r--r--custom/conf/app.example.ini3
1 files changed, 3 insertions, 0 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index 301e88b14e..b0875123b7 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -1067,6 +1067,9 @@ LEVEL = Info
;;
;; In addition to testing patches using the three-way merge method, re-test conflicting patches with git apply
;TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY = false
+;;
+;; Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo.
+;RETARGET_CHILDREN_ON_MERGE = true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;