mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
enhance(api): expose file mode in contents API response (#38713)
This commit is contained in:
@@ -109,6 +109,7 @@ func getExpectedFileResponseForRepoFilesCreate(commitID string, lastCommit *git.
|
||||
LastCommitterDate: new(lastCommit.Committer.When),
|
||||
LastAuthorDate: new(lastCommit.Author.When),
|
||||
Type: "file",
|
||||
Mode: "100644",
|
||||
Size: 18,
|
||||
Encoding: &encoding,
|
||||
Content: &content,
|
||||
@@ -179,6 +180,7 @@ func getExpectedFileResponseForRepoFilesUpdate(commitID, filename, lastCommitSHA
|
||||
LastCommitterDate: new(lastCommitterWhen),
|
||||
LastAuthorDate: new(lastAuthorWhen),
|
||||
Type: "file",
|
||||
Mode: "100644",
|
||||
Size: 43,
|
||||
Encoding: &encoding,
|
||||
Content: &content,
|
||||
@@ -283,6 +285,7 @@ func getExpectedFileResponseForRepoFilesUpdateRename(commitID, lastCommitSHA str
|
||||
SHA: detail.sha,
|
||||
LastCommitSHA: new(lastCommitSHA),
|
||||
Type: "file",
|
||||
Mode: "100644",
|
||||
Size: detail.size,
|
||||
Encoding: new("base64"),
|
||||
Content: &detail.content,
|
||||
|
||||
Reference in New Issue
Block a user