Signed-off-by: oppiliappan me@oppi.li
+16
-5
Diff
round #1
+2
appview/pages/pages.go
+2
appview/pages/pages.go
+1
-1
appview/pages/templates/layouts/repobase.html
+1
-1
appview/pages/templates/layouts/repobase.html
+11
-2
appview/pulls/pulls.go
+11
-2
appview/pulls/pulls.go
···
236
defs[l.AtUri().String()] = &l
237
}
238
239
-
s.pages.RepoSinglePull(w, pages.RepoSinglePullParams{
240
LoggedInUser: user,
241
RepoInfo: s.repoResolver.GetRepoInfo(r, user),
242
Pull: pull,
···
247
MergeCheck: mergeCheckResponse,
248
ResubmitCheck: resubmitResult,
249
Pipelines: m,
250
251
OrderedReactionKinds: models.OrderedReactionKinds,
252
Reactions: reactionMap,
253
UserReacted: userReactions,
254
255
LabelDefs: defs,
256
-
})
257
}
258
259
func (s *Pulls) mergeCheck(r *http.Request, f *models.Repo, pull *models.Pull, stack models.Stack) types.MergeCheckResponse {
···
236
defs[l.AtUri().String()] = &l
237
}
238
239
+
patch := pull.LatestSubmission().CombinedPatch()
240
+
diff := patchutil.AsNiceDiff(patch, pull.TargetBranch)
241
+
var diffOpts types.DiffOpts
242
+
if d := r.URL.Query().Get("diff"); d == "split" {
243
+
diffOpts.Split = true
244
+
}
245
+
246
+
log.Println(s.pages.RepoSinglePull(w, pages.RepoSinglePullParams{
247
LoggedInUser: user,
248
RepoInfo: s.repoResolver.GetRepoInfo(r, user),
249
Pull: pull,
···
254
MergeCheck: mergeCheckResponse,
255
ResubmitCheck: resubmitResult,
256
Pipelines: m,
257
+
Diff: &diff,
258
+
DiffOpts: diffOpts,
259
260
OrderedReactionKinds: models.OrderedReactionKinds,
261
Reactions: reactionMap,
262
UserReacted: userReactions,
263
264
LabelDefs: defs,
265
+
}))
266
}
267
268
func (s *Pulls) mergeCheck(r *http.Request, f *models.Repo, pull *models.Pull, stack models.Stack) types.MergeCheckResponse {
+2
-2
spindle/models/models.go
+2
-2
spindle/models/models.go
History
2 rounds
0 comments
1 commit
expand
collapse
appview/pulls: directly pass diff and diff opts into main PR page
Signed-off-by: oppiliappan <me@oppi.li>
3/3 success
expand
collapse
expand 0 comments
pull request successfully merged
1 commit
expand
collapse
appview/pulls: directly pass diff and diff opts into main PR page
Signed-off-by: oppiliappan <me@oppi.li>