forked from forgejo/forgejo
Branches not at ref commit ID should not be listed as Merged (#9614)
Once a branch has been merged if the commit ID no longer equals that of the pulls ref commit id don't offer to delete the branch on the pull screen and don't list it as merged on branches. Fix #9201 When looking at the pull page we should also get the commits from the refs/pulls/x/head Fix #9158
This commit is contained in:
parent
9406368633
commit
e5d8e2d10c
10 changed files with 112 additions and 39 deletions
|
@ -122,7 +122,7 @@ func (pr *PullRequest) LoadHeadRepo() error {
|
|||
if has, err := x.ID(pr.HeadRepoID).Get(&repo); err != nil {
|
||||
return err
|
||||
} else if !has {
|
||||
return ErrRepoNotExist{ID: pr.BaseRepoID}
|
||||
return ErrRepoNotExist{ID: pr.HeadRepoID}
|
||||
}
|
||||
pr.HeadRepo = &repo
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue