KN4CK3R
a35749893b
Move convert
package to services ( #22264 )
...
Addition to #22256
The `convert` package relies heavily on different models which is
[disallowed by our definition of
modules](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#design-guideline ).
This helps to prevent possible import cycles.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-12-29 10:57:15 +08:00
flynnnnnnnnnn
e81ccc406b
Implement FSFE REUSE for golang files ( #21840 )
...
Change all license headers to comply with REUSE specification.
Fix #16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2022-11-27 18:20:29 +00:00
Lunny Xiao
719bddcd76
Move repository model into models/repo ( #17933 )
...
* Some refactors related repository model
* Move more methods out of repository
* Move repository into models/repo
* Fix test
* Fix test
* some improvements
* Remove unnecessary function
2021-12-10 09:27:50 +08:00
qwerty287
3676fafdac
Add API to get/edit wiki ( #17278 )
...
* Add API to get/edit wiki
* Add swagger docs, various improvements
* fmt
* Fix lint and rm comment
* Add page parameter
* Add pagination to pages
* Add tests
* fmt
* Update func names
* Update error handling
* Update type name
* Fix lint
* Don't delete Home
* Update func name
* Update routers/api/v1/repo/wiki.go
Co-authored-by: delvh <dev.lh@web.de>
* Remove unnecessary check
* Fix lint
* Use English strings
* Update integrations/api_wiki_test.go
Co-authored-by: delvh <dev.lh@web.de>
* Update func and test names
* Remove unsed check and avoid duplicated error reports
* Improve error handling
* Return after error
* Document 404 error
* Update swagger
* Fix lint
* Apply suggestions from code review
Co-authored-by: delvh <dev.lh@web.de>
* Document file encoding
* fmt
* Apply suggestions
* Use convert
* Fix integration test
* simplify permissions
* unify duplicate key Title/Name
* improve types & return UTC timestamps
* improve types pt.2
- add WikiPageMetaData.LastCommit
- add WikiPageMetaData.HTMLURL
- replace WikiPageMetaData.Updated with .LastCommit.Committer.Created
also delete convert.ToWikiPage(), as it received too many arguments and
only had one callsite anyway. sorry for bad advice earlier 🙃
* WikiPage.Content is base64 encoded
* simplify error handling in wikiContentsByName()
* update swagger
* fix & DRY findWikiRepoCommit() error handling
ListWikiPages() previously wrote error twice when repo wiki didn't exist
* rename Content -> ContentBase64
* Fix test
* Fix tests
* Update var name
* suburl -> sub_url
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-10-25 11:43:40 +08:00