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