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/api/v1/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
..
action.go Refactor secrets modification logic (#26873) 1 year ago
avatar.go Add missing 404 response to Swagger (#27038) 1 year ago
blob.go Add missing 404 response to Swagger (#27038) 1 year ago
branch.go Add branch protection setting for ignoring stale approvals (#28498) 1 year ago
collaborators.go Move more functions to db.Find (#28419) 1 year ago
commits.go Filter get single commit (#24613) 2 years ago
file.go Updates to the API for archived repos (#27149) 1 year ago
fork.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
git_hook.go Add missing 404 response to Swagger (#27038) 1 year ago
git_ref.go Implement FSFE REUSE for golang files (#21840) 2 years ago
hook.go Use db.Find instead of writing methods for every object (#28084) 1 year ago
hook_test.go Move web/api context related testing function into a separate package (#26859) 1 year ago
issue.go Fix comment permissions (#28213) 1 year ago
issue_attachment.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
issue_comment.go Fix comment permissions (#28213) 1 year ago
issue_comment_attachment.go Fix comment permissions (#28213) 1 year ago
issue_dependency.go Fix issue dependencies (#27736) 1 year ago
issue_label.go Don't let API add 2 exclusive labels from same scope (#27433) 1 year ago
issue_pin.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
issue_reaction.go Fix comment permissions (#28213) 1 year ago
issue_stopwatch.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
issue_subscription.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
issue_tracked_time.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
key.go Fix comment permissions (#28213) 1 year ago
label.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
language.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go make writing main test easier (#27270) 1 year ago
migrate.go Remove unnecessary parameter (#27671) 1 year ago
milestone.go Second part of refactor `db.Find` (#28194) 1 year ago
mirror.go Refactor deletion (#28610) 1 year ago
notes.go Abstract hash function usage (#28138) 1 year ago
patch.go Updates to the API for archived repos (#27149) 1 year ago
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 Move more functions to db.Find (#28419) 1 year ago
release_attachment.go Fix comment permissions (#28213) 1 year ago
release_tags.go Fix comment permissions (#28213) 1 year ago
repo.go Fix schedule tasks bugs (#28691) 1 year ago
repo_test.go Move web/api context related testing function into a separate package (#26859) 1 year ago
runners.go Add get actions runner registration token for API routes, repo, org, user and global level (#27144) 1 year ago
star.go More refactoring of `db.DefaultContext` (#27083) 1 year ago
status.go Fix `GetCommitStatuses` (#28787) 1 year ago
subscriber.go More refactoring of `db.DefaultContext` (#27083) 1 year ago
tag.go Fix comment permissions (#28213) 1 year ago
teams.go More refactoring of `db.DefaultContext` (#27083) 1 year ago
topic.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
transfer.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
tree.go Add missing 404 response to Swagger (#27038) 1 year ago
wiki.go Updates to the API for archived repos (#27149) 1 year ago