mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-17 01:20:37 +00:00
@@ -162,8 +162,10 @@ func LoadUser(t *testing.T, ctx gocontext.Context, userID int64) {
|
||||
switch ctx := ctx.(type) {
|
||||
case *context.Context:
|
||||
ctx.Doer = doer
|
||||
ctx.IsSigned = true
|
||||
case *context.APIContext:
|
||||
ctx.Doer = doer
|
||||
ctx.IsSigned = true
|
||||
default:
|
||||
assert.FailNow(t, "context is not *context.Context or *context.APIContext")
|
||||
}
|
||||
|
||||
@@ -200,6 +200,11 @@ type DiffBlobExcerptData struct {
|
||||
AfterCommitID string
|
||||
}
|
||||
|
||||
const (
|
||||
DiffStyleSplit = "split"
|
||||
DiffStyleUnified = "unified"
|
||||
)
|
||||
|
||||
func (d *DiffLine) RenderBlobExcerptButtons(fileNameHash string, data *DiffBlobExcerptData) template.HTML {
|
||||
dataHiddenCommentIDs := strings.Join(base.Int64sToStrings(d.SectionInfo.HiddenCommentIDs), ",")
|
||||
anchor := fmt.Sprintf("diff-%sK%d", fileNameHash, d.SectionInfo.RightIdx)
|
||||
|
||||
Reference in New Issue
Block a user