mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
[GITEA] Find README.md for user profiles case insensitively
When trying to find a `README.md` in a `.profile` repo, do so case insensitively. This change does not make it possible to render readmes in formats other than Markdown, it just removes the hard-coded "README.md". Also adds a few tests to make sure the change works. Fixes #1494. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu> (cherry picked from commitedd219d8e9
) (cherry picked from commit2c0105ef17
) (cherry picked from commit3975a9f3aa
) (cherry picked from commitdee4a18423
) (cherry picked from commit60aee6370f
)
This commit is contained in:
parent
159dc74ceb
commit
e019eb33a2
3 changed files with 142 additions and 1 deletions
|
@ -97,7 +97,7 @@ func FindUserProfileReadme(ctx *context.Context, doer *user_model.User) (profile
|
|||
if commit, err := profileGitRepo.GetBranchCommit(profileDbRepo.DefaultBranch); err != nil {
|
||||
log.Error("FindUserProfileReadme failed to GetBranchCommit: %v", err)
|
||||
} else {
|
||||
profileReadmeBlob, _ = commit.GetBlobByPath("README.md")
|
||||
profileReadmeBlob, _ = commit.GetBlobByFoldedPath("README.md")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue