6543
54e9ee37a7
format with gofumpt ( #18184 )
...
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
3 years ago
Lunny Xiao
a666829a37
Move user related model into models/user ( #17781 )
...
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
3 years ago
Gusted
c98dd7a3e0
Remove unnecessary variable assignments ( #17695 )
...
* Remove unnecessary variable assignments
As title
* enable ineffassign
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
3 years ago
wxiaoguang
81926d61db
Decouple unit test, remove intermediate `unittestbridge` package ( #17662 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
Lunny Xiao
a4bfef265d
Move db related basic functions to models/db ( #17075 )
...
* Move db related basic functions to models/db
* Fix lint
* Fix lint
* Fix test
* Fix lint
* Fix lint
* revert unnecessary change
* Fix test
* Fix wrong replace string
* Use *Context
* Correct committer spelling and fix wrong replaced words
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
6543
290cf75f93
[refactor] Unify the export of user data via API ( #15144 )
...
* [refactor] unify how user data is exported via API
* test time via unix timestamp
4 years ago
6543
d453533beb
[Refactor] Move APIFormat functions into convert package ( #12856 )
...
* USER APIFormat -> ToUser
* Migrate more and mark APIFormat deprecated
* models.Comment APIFormat() -> convert.ToComment
* models.Release APIFormat() -> convert.ToRelease
* models.Attachments APIFormat() -> convert.ToReleaseAttachments
* models.CommitStatus APIFormat() -> convert.ToCommitStatus
* finish migration to convert.ToUser
* Move Test
* Imprufe Test
* fix test
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
6543
2a52aeec49
API: Expose its limitation settings ( #12714 )
...
* API: Expose its limitation settings
* TESTs
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
6543
fc2f2c7602
API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new swagger section settings ( #11854 )
...
* move Setting function into its own package
* swagger add&use new section "settings"
* move api AllowedReactions into general UI-Settings endpoint
* prepare TEST
* lint
4 years ago
6543
b534a5164f
[API] Expose allowed Reactions ( #11735 )
...
* [API] Expose allowed Reactions
* dont be in soutch a rush
* add TEST
* use ElementsMatch
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
6543
9600c27085
[API] Fix 9544 | return 200 when reaction already exist ( #9550 )
...
* add ErrReactionAlreadyExist
* extend CreateReaction
* reaction already exist = 200
* extend FindReactionsOptions
* refactor swagger options/definitions
* fix swagger-validate
* Update models/error.go
Co-Authored-By: zeripath <art27@cantab.net>
* fix test PART1
* extend FindReactionsOptions with UserID option
* catch error on test
* fix test PART2
* format ...
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
5 years ago
6543
6d811bcb14
Hide not allowed Reactions ( #9387 )
...
* Hide not allowed Reactions
* filter in query :D
* use `
Co-Authored-By: Alexey 〒erentyev <axifnx@gmail.com>
* update xorm v0.8.0 -> v0.8.1
5 years ago
6543
37e10d4543
[API] Add Reactions ( #9220 )
...
* reject reactions wich ar not allowed
* dont duble check CreateReaction now throw ErrForbiddenIssueReaction
* add /repos/{owner}/{repo}/issues/comments/{id}/reactions endpoint
* add Find Functions
* fix some swagger stuff + add issue reaction endpoints + GET ReactionList now use FindReactions...
* explicite Issue Only Reaction for FindReactionsOptions with "-1" commentID
* load issue; load user ...
* return error again
* swagger def canged after LINT
* check if user has ben loaded
* add Tests
* better way of comparing results
* add suggestion
* use different issue for test
(dont interfear with integration test)
* test dont compare Location on timeCompare
* TEST: add forbidden dubble add
* add comments in code to explain
* add settings.UI.ReactionsMap
so if !setting.UI.ReactionsMap[opts.Type] works
5 years ago