Commit Graph

19 Commits (fee0e4dbeac842e606846eda1d311fed352da3b8)

Author SHA1 Message Date
Lunny Xiao 1a9821f57a
Move issues related files into models/issues ()
* Move access and repo permission to models/perm/access

* fix test

* fix git test

* Move functions sequence

* Some improvements per @KN4CK3R and @delvh

* Move issues related code to models/issues

* Move some issues related sub package

* Merge

* Fix test

* Fix test

* Fix test

* Fix test

* Rename some files
6543 54e9ee37a7
format with gofumpt ()
* gofumpt -w -l .

* gofumpt -w -l -extra .

* Add linter

* manual fix

* change make fmt
qwerty287 7db2f110ad
Add API to get issue/pull comments and events (timeline) ()
* Add API to get issue/pull comments and events (timeline)
Adds an API to get both comments and events in one endpoint with all required data.
Closes 

* Fix swagger

* Don't show code comments (use review api instead)

* fmt

* Fix comment

* Time -> TrackedTime

* Use var directly

* Add logger

* Fix lint

* Fix test

* Add comments

* fmt

* [test] get issue directly by ID

* Update test

* Add description for changed refs

* Fix build issues + lint

* Fix build

* Use string enums

* Update swagger

* Support `page` and `limit` params

* fmt + swagger

* Use global slices

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Lunny Xiao 719bddcd76
Move repository model into models/repo ()
* 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
Lunny Xiao a666829a37
Move user related model into models/user ()
* Move user related model into models/user

* Fix lint for windows

* Fix windows lint

* Fix windows lint

* Move some tests in models

* Merge
Gusted c98dd7a3e0
Remove unnecessary variable assignments ()
* Remove unnecessary variable assignments

As title

* enable ineffassign

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 81926d61db
Decouple unit test, remove intermediate `unittestbridge` package ()
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Lunny Xiao a4bfef265d
Move db related basic functions to models/db ()
* 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>
6543 d453533beb
[Refactor] Move APIFormat functions into convert package ()
* 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>
6543 0b3aaa6196 [API] Add "before" query to ListIssueComments and ListRepoIssue… ()
* add "before" query to ListIssueComments and ListRepoIssueComments

* Add TEST

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
6543 e88d67b774 [API] add comments endpoint for single comment ()
* add GET /repos/{owner}/{repo}/issues/comments/{id}
 and complete error list for swagger in other func

* add repo check
zeripath 055f6d2296 Fix "data race" in testlogger ()
* Fix data race in testlogger

* Update git_helper_for_declarative_test.go
Lunny Xiao 34eee25bd4
Move sdk structs to modules/structs ()
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
B-OnTheGo e47df0b301 Enforce token on api routes [fixed critical security issue ] ()
Ethan Koenig c3b6383b3a Fix comment API paths ()
Ethan Koenig dd758ad8dc More integration tests for comment API ()
Ethan Koenig f1adaef458 Less verbose integration tests ()
* Helper functions for intergration test boilerplate
Ethan Koenig f64c232953 Improve integration test helper functions ()
Set request headers in helper functions, and new helper for requests with string-formatted URLs
Ethan Koenig 255adc40ae Don't show non-comments in comments API ()