Skip to content

Commit b252b23

Browse files
everhopingandwaiting6543techknowlogick
authored
[feature] provide OwnerName field for README template (#10981)
Co-Authored-By: 6543 <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent 1783798 commit b252b23

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Locales may change between versions, so keeping track of your customized locales
236236
To add a custom Readme, add a markdown formatted file (without an `.md` extension) to `custom/options/readme`
237237

238238
**NOTE:** readme templates support **variable expansion**.
239-
currently there are `{Name}` (name of repository), `{Description}`, `{CloneURL.SSH}` and `{CloneURL.HTTPS}`
239+
currently there are `{Name}` (name of repository), `{Description}`, `{CloneURL.SSH}`, `{CloneURL.HTTPS}` and `{OwnerName}`
240240

241241
### Reactions
242242

modules/repository/init.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ func prepareRepoCommit(ctx models.DBContext, repo *models.Repository, tmpDir, re
5555
"Description": repo.Description,
5656
"CloneURL.SSH": cloneLink.SSH,
5757
"CloneURL.HTTPS": cloneLink.HTTPS,
58+
"OwnerName": repo.OwnerName,
5859
}
5960
if err = ioutil.WriteFile(filepath.Join(tmpDir, "README.md"),
6061
[]byte(com.Expand(string(data), match)), 0644); err != nil {

0 commit comments

Comments
 (0)