mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-11-08 18:24:31 +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)
This commit is contained in:
parent
6b7c7d18dc
commit
3975a9f3aa
3 changed files with 142 additions and 1 deletions
|
|
@ -96,7 +96,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