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/routers/web/repo
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 Only check online runner when detecting matching runners in workflows (#28286) 1 year ago
setting Add branch protection setting for ignoring stale approvals (#28498) 1 year ago
activity.go
attachment.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
blame.go Use information from previous blame parts (#28572) 1 year ago
branch.go Adjust object format interface (#28469) 1 year ago
cherry_pick.go Upgrade to golangci-lint@v1.55.0 (#27756) 1 year ago
commit.go Rework markup link rendering (#26745) 1 year ago
compare.go Assign pull request to project during creation (#28227) 1 year ago
download.go
editor.go Revert "Fix EOL handling in web editor" (#28101) 1 year ago
editor_test.go
find.go
githttp.go Adjust object format interface (#28469) 1 year ago
githttp_test.go Fix http protocol auth (#27875) 1 year ago
helper.go Improve tree not found page (#26570) 1 year ago
helper_test.go
issue.go Add ability to see open and closed issues at the same time (#28757) 1 year ago
issue_content_history.go Fix missing check (#28406) 1 year ago
issue_dependency.go Upgrade to golangci-lint@v1.55.0 (#27756) 1 year ago
issue_label.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
issue_label_test.go
issue_lock.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
issue_pin.go Fix missing check (#28406) 1 year ago
issue_stopwatch.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
issue_test.go
issue_timetrack.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
issue_watch.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
main_test.go make writing main test easier (#27270) 1 year ago
middlewares.go Fix viewing wiki commit on empty repo (#28040) 1 year ago
migrate.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
milestone.go Rework markup link rendering (#26745) 1 year ago
packages.go
patch.go Upgrade to golangci-lint@v1.55.0 (#27756) 1 year ago
projects.go Rework markup link rendering (#26745) 1 year ago
projects_test.go
pull.go Retarget depending pulls when the parent branch is deleted (#28686) 1 year ago
pull_review.go More `db.DefaultContext` refactor (#27265) 1 year ago
release.go Rework markup link rendering (#26745) 1 year ago
release_test.go Move more functions to db.Find (#28419) 1 year ago
render.go Rework markup link rendering (#26745) 1 year ago
repo.go Remove trust model selection from repository creation on web page because it can be changed in settings later (#28814) 1 year ago
search.go
topic.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
treelist.go
view.go Show latest commit for file (#28067) 1 year ago
view_test.go
wiki.go Rework markup link rendering (#26745) 1 year ago
wiki_test.go