You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services
Viktor Kuzmin 49eb168677
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>
1 year ago
..
actions Fix schedule tasks bugs (#28691) 1 year ago
agit Adjust object format interface (#28469) 1 year ago
asymkey Move more functions to db.Find (#28419) 1 year ago
attachment Even more `db.DefaultContext` refactor (#27352) 1 year ago
auth Refactor timeutil package (#28623) 1 year ago
automerge Improve queue and logger context (#24924) 2 years ago
context Another round of `db.DefaultContext` refactor (#27103) 1 year ago
convert Add branch protection setting for ignoring stale approvals (#28498) 1 year ago
cron Update go dependencies (#28518) 1 year ago
externalaccount Final round of `db.DefaultContext` refactor (#27587) 1 year ago
feed More `db.DefaultContext` refactor (#27265) 1 year ago
forms Remove trust model selection from repository creation on web page because it can be changed in settings later (#28814) 1 year ago
gitdiff Add option to disable ambiguous unicode characters detection (#28454) 1 year ago
indexer Fix missing issue search index update when changing status (#28325) 1 year ago
issue Remove deadcode under models/issues (#28536) 1 year ago
lfs Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 1 year ago
mailer Rework markup link rendering (#26745) 1 year ago
markup make writing main test easier (#27270) 1 year ago
migrations Move more functions to db.Find (#28419) 1 year ago
mirror Refactor deletion (#28610) 1 year ago
notify Update status and code index after changing the default branch (#27018) 1 year ago
org Delete repos of org when purge delete user (#27273) 1 year ago
packages Fix reverting a merge commit failing (#28794) 1 year ago
pull Retarget depending pulls when the parent branch is deleted (#28686) 1 year ago
release Refactor deletion (#28610) 1 year ago
repository Fix reverting a merge commit failing (#28794) 1 year ago
secrets Refactor deletion (#28610) 1 year ago
task Fix incorrect ctx usage in defer function (#27740) 1 year ago
uinotification Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
user Forbid removing the last admin user (#28337) 1 year ago
webhook Abstract hash function usage (#28138) 1 year ago
wiki Fix schedule tasks bugs (#28691) 1 year ago