summaryrefslogtreecommitdiffstats
path: root/models/pull_sign.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-03-03 06:31:55 +0800
committerGitHub <noreply@github.com>2020-03-02 22:31:55 +0000
commit5abe1c52de533b52725b1e584db9fea6fb1b39ab (patch)
tree1cd49bc1a609bb919c70d6bc30727c524c3e6105 /models/pull_sign.go
parent22b750702408a39a524e011b729d0e0befb30e16 (diff)
downloadgitea-5abe1c52de533b52725b1e584db9fea6fb1b39ab.tar.gz
gitea-5abe1c52de533b52725b1e584db9fea6fb1b39ab.zip
Display pull request head branch even the branch deleted or repository deleted (#10413)
* Display pull request head branch even the branch deleted or repository deleted * Merge getHeadRepo/loadHeadRepo and getBaseRepo/loadBaseRepo on pull and fill repo when pr.Issue.Repo is available * retrieve sha from pull head when pull request branch deleted and fix tests * Fix test * Ensure MustHeadRepoName returns empty string if no head repo Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'models/pull_sign.go')
-rw-r--r--models/pull_sign.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/pull_sign.go b/models/pull_sign.go
index 5b26b4bdc9..91b8defa53 100644
--- a/models/pull_sign.go
+++ b/models/pull_sign.go
@@ -12,7 +12,7 @@ import (
// SignMerge determines if we should sign a PR merge commit to the base repository
func (pr *PullRequest) SignMerge(u *User, tmpBasePath, baseCommit, headCommit string) (bool, string, error) {
- if err := pr.GetBaseRepo(); err != nil {
+ if err := pr.LoadBaseRepo(); err != nil {
log.Error("Unable to get Base Repo for pull request")
return false, "", err
}