mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-08 14:34:49 +09:00
Refactor compare diff/pull page (1) (#37481)
1. Rename CompareInfo.MergeBase to CompareBase, it is not merge base 2. Remove unused template variables `ctx.Data["Username"]` and `ctx.Data["Reponame"]` 3. Decouple some template variable accesses, use typed struct --------- Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
@@ -521,7 +521,7 @@ func CreatePullRequest(ctx *context.APIContext) {
|
||||
BaseBranch: compareResult.BaseRef.ShortName(),
|
||||
HeadRepo: compareResult.HeadRepo,
|
||||
BaseRepo: repo,
|
||||
MergeBase: compareResult.MergeBase,
|
||||
MergeBase: compareResult.CompareBase,
|
||||
Type: issues_model.PullRequestGitea,
|
||||
}
|
||||
|
||||
@@ -1569,7 +1569,7 @@ func GetPullRequestFiles(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
|
||||
startCommitID := compareInfo.MergeBase
|
||||
startCommitID := compareInfo.CompareBase
|
||||
endCommitID := headCommitID
|
||||
|
||||
maxLines := setting.Git.MaxGitDiffLines
|
||||
|
||||
Reference in New Issue
Block a user