Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | api: support put content (#7114) | Mateusz Reszka | 2022-10-22 |
| | | | Co-authored-by: Joe Chen <jc@unknwon.io> | ||
* | refactor: unify error handling in routing layer | ᴜɴᴋɴᴡᴏɴ | 2020-03-16 |
| | |||
* | api: overhaul `/repos/owner/repos/contents` (#5980) | ᴜɴᴋɴᴡᴏɴ | 2020-03-10 |
| | | | | | * Fix import path renaming * api: overhaul /repos/owner/repos/contents | ||
* | git: migrate to github.com/gogs/git-module@v1.0.0 (#5958) | ᴜɴᴋɴᴡᴏɴ | 2020-03-08 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP * Finish `internal/db/git_diff.go` * FInish internal/db/mirror.go * Finish internal/db/pull.go * Finish internal/db/release.go * Finish internal/db/repo.go * Finish internal/db/repo_branch.go * Finish internal/db/repo_editor.go * Finish internal/db/update.go * Save my work * Add license header * Compile! * Merge master * Finish internal/cmd/hook.go * Finish internal/conf/static.go * Finish internal/context/repo.go * Finish internal/db/action.go * Finish internal/db/git_diff.go * Fix submodule URL inferring * Finish internal/db/mirror.go * Updat to beta.4 * css: update fonts * Finish internal/db/pull.go * Finish internal/db/release.go * Finish internal/db/repo_branch.go * Finish internal/db/wiki.go * gitutil: enhance infer submodule UR * Finish internal/route/api/v1/repo/commits.go * mirror: only collect branch commits after sync * mirror: fix tag support * Finish internal/db/repo.go * Finish internal/db/repo_editor.go * Finish internal/db/update.go * Finish internal/gitutil/pull_request.go * Make it compile * Finish internal/route/repo/setting.go * Finish internal/route/repo/branch.go * Finish internal/route/api/v1/repo/file.go * Finish internal/route/repo/download.go * Finish internal/route/repo/editor.go * Use helper * Finish internal/route/repo/issue.go * Finish internal/route/repo/pull.go * Finish internal/route/repo/release.go * Finish internal/route/repo/repo.go * Finish internal/route/repo/wiki.go * Finish internal/route/repo/commit.go * Finish internal/route/repo/view.go * Finish internal/gitutil/tag.go * go.sum | ||
* | api: `GET /repos/:owner/:repo/contents/:path` (#5963) | ᴜɴᴋɴᴡᴏɴ | 2020-03-05 |
* support API `GET /repos/:owner/:repo/contents/:path` This PR adds support to #5949: `GET /repos/:owner/:repo/contents/:path` Curl: ```bash curl -H "Authorization: token REDACTED" http://localhost:3000/api/v1/repos/root/testrepo/contents//master/README.md -X GET | jq . ``` Curl Response: ```bash { "type": "blob", "size": 12, "name": "README.md", "path": "README.md", "sha": "70fcb456d436f08462602f26df6fb7e167e7a916", "url": "http://localhost:3000/api/v1/repos/root/testrepo/contents/README.md", "git_url": "http://localhost:3000/api/v1/repos/root/testrepo/trees/70fcb456d436f08462602f26df6fb7e167e7a916", "html_url": "http://localhost:3000/api/v1/repos/root/testrepo/tree/70fcb456d436f08462602f26df6fb7e167e7a916", "download_url": "http://localhost:3000/api/v1/root/testrepo/raw/README.md", "_links": { "git": "http://localhost:3000/api/v1/repos/root/testrepo/trees/70fcb456d436f08462602f26df6fb7e167e7a916", "self": "http://localhost:3000/api/v1/repos/root/testrepo/contents/README.md", "html": "http://localhost:3000/api/v1/repos/root/testrepo/tree/70fcb456d436f08462602f26df6fb7e167e7a916" }, "content": "IyB0ZXN0cmVwbwoK" } ``` * rename - path.go to contents.go * reorder imports Co-Authored-By: ᴜɴᴋɴᴡᴏɴ <u@gogs.io> * rename struct to repoContents and fix field order Co-Authored-By: ᴜɴᴋɴᴡᴏɴ <u@gogs.io> * rename variable Co-Authored-By: ᴜɴᴋɴᴡᴏɴ <u@gogs.io> * rename GetPathContents to GetContents Co-Authored-By: ᴜɴᴋɴᴡᴏɴ <u@gogs.io> * return on server error Co-Authored-By: ᴜɴᴋɴᴡᴏɴ <u@gogs.io> * resolve conflicts introduced via git web ui * make constants as method variables * handle dir type case last * fix func and var names * implement suggested changes in review * refactor smaller funcs to be part of GetContent * fix content type check for blob after refactoring * changes based on suggestions * read full file, return empty json array * don't set submoduleURL * set server err msg to method name * set target to be blob data for symlinks * Update contents.go Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io> |