diff options
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/devtest/mock_actions.go | 10 | ||||
-rw-r--r-- | routers/web/repo/editor.go | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/routers/web/devtest/mock_actions.go b/routers/web/devtest/mock_actions.go index 023909aceb..bc741ecd11 100644 --- a/routers/web/devtest/mock_actions.go +++ b/routers/web/devtest/mock_actions.go @@ -94,6 +94,16 @@ func MockActionsRunsJobs(ctx *context.Context) { Size: 1024 * 1024, Status: "completed", }) + resp.Artifacts = append(resp.Artifacts, &actions.ArtifactsViewItem{ + Name: "artifact-very-loooooooooooooooooooooooooooooooooooooooooooooooooooooooong", + Size: 100 * 1024, + Status: "expired", + }) + resp.Artifacts = append(resp.Artifacts, &actions.ArtifactsViewItem{ + Name: "artifact-really-loooooooooooooooooooooooooooooooooooooooooooooooooooooooong", + Size: 1024 * 1024, + Status: "completed", + }) resp.State.Run.Jobs = append(resp.State.Run.Jobs, &actions.ViewJob{ ID: runID * 10, diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go index 514eb0ebfe..03e5b830a0 100644 --- a/routers/web/repo/editor.go +++ b/routers/web/repo/editor.go @@ -165,7 +165,7 @@ func editFile(ctx *context.Context, isNewFile bool) { ctx.Data["FileSize"] = blob.Size() // Only some file types are editable online as text. - if !fInfo.isTextFile || fInfo.isLFSFile { + if !fInfo.st.IsRepresentableAsText() || fInfo.isLFSFile { ctx.NotFound(nil) return } |