-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
bug fixed for API to get user's repos #1622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
LGTM |
routers/api/v1/user/repo.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx.User is also used in getAccessibleReposcalled from https://github.com/lunny/gitea/blob/07ad1e27dd8fbebb90b53590a958115e7c680130/routers/api/v1/user/repo.go#L18
|
For testing you can make integration test and request the API directly ? |
|
@lunny Perfect. Still LGTM for me ^^ |
|
LGTM |
integrations/api_repo_test.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user1 don't have repos in mock value so maybe we could also test user2 repo listing?
https://github.com/go-gitea/gitea/blob/master/models/fixtures/repository.yml
|
waiting for #1627 |
80ad764 to
8bb4a20
Compare
|
let L-G-T-M work |
As title. Will fix #1540. And how to test APIs? Maybe we need a framework like intergration test to do that?