1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor RepoRefByType (#32413)

1. clarify the "filepath" could(should) contain "{ref}"
2. remove unclear RepoRefLegacy and RepoRefAny, use RepoRefUnknown to guess
3. by the way, avoid using AppURL
This commit is contained in:
wxiaoguang
2024-11-05 14:35:54 +08:00
committed by GitHub
parent 4a469c8e1b
commit 61c35590c7
7 changed files with 100 additions and 109 deletions

View File

@@ -56,12 +56,12 @@ func GetRawFile(ctx *context.APIContext) {
// required: true
// - name: filepath
// in: path
// description: filepath of the file to get
// description: path of the file to get, it should be "{ref}/{filepath}". If there is no ref could be inferred, it will be treated as the default branch
// type: string
// required: true
// - name: ref
// in: query
// description: "The name of the commit/branch/tag. Default the repositorys default branch (usually master)"
// description: "The name of the commit/branch/tag. Default the repositorys default branch"
// type: string
// required: false
// responses:
@@ -109,12 +109,12 @@ func GetRawFileOrLFS(ctx *context.APIContext) {
// required: true
// - name: filepath
// in: path
// description: filepath of the file to get
// description: path of the file to get, it should be "{ref}/{filepath}". If there is no ref could be inferred, it will be treated as the default branch
// type: string
// required: true
// - name: ref
// in: query
// description: "The name of the commit/branch/tag. Default the repositorys default branch (usually master)"
// description: "The name of the commit/branch/tag. Default the repositorys default branch"
// type: string
// required: false
// responses: