Skip to content
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

Add review request api #11355

Merged
merged 33 commits into from Oct 20, 2020
Merged

Conversation

a1012112796
Copy link
Member

@a1012112796 a1012112796 commented May 9, 2020

New api:

  • add : POST /repos/{owner}/{repo}/pulls/{index}/requested_reviewers
  • Remove : DELET /repos/{owner}/{repo}/pulls/{index}/requested_reviewers
    Note: reviw request can be alos get and list by get or list review api, so not add another like github

Other changes:

  • fix some request review bug
  • block delet request review by models/DeleteReview()

Contains #13187

* add : POST /repos/{owner}/{repo}/pulls/{index}/requested_reviewers
* Remove : DELET /repos/{owner}/{repo}/pulls/{index}/requested_reviewers
* fix some request review bug
* block delet request review by models/DeleteReview()

Signed-off-by: a1012112796 <1012112796@qq.com>
@6543
Copy link
Member

6543 commented May 9, 2020

nil pointer exeptions

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 9, 2020
@a1012112796

This comment has been minimized.

@6543
Copy link
Member

6543 commented May 10, 2020

on my linux system I just use make test and make test-sqlite

models/review.go Outdated Show resolved Hide resolved
routers/api/v1/api.go Outdated Show resolved Hide resolved
@a1012112796
Copy link
Member Author

on my linux system I just use make test and make test-sqlite

I see, I haven't try it in linux, I use windows more offen.Do you know how to run it with ide like vscode or other? Thanks

@6543
Copy link
Member

6543 commented May 10, 2020

Do you know how to run it with ide like vscode or other

sorry - I dont, I use the shell all the time so I didnt looked at gui stuff

services/issue/assignee.go Outdated Show resolved Hide resolved
@a1012112796
Copy link
Member Author

Please review, Thanks :)

@6543
Copy link
Member

6543 commented May 11, 2020

ìnstead of a own PullReviewRequestErr format just use the default error format the API returns normaly & I would return a PullReview on rewuest addition and a 204 with empty body on deletion ...

@lafriks lafriks added the modifies/api This PR adds API routes or modifies them label May 12, 2020
models/review.go Outdated Show resolved Hide resolved
@6543
Copy link
Member

6543 commented May 12, 2020

example result...

@a1012112796 I still think we should not combine error and sucess into a single responce
500 for generic error, 422 if input is infalid, 404 if something do not exist, ...
200/201 if you successfully added reviewrequest 204 if you removed it

@a1012112796
Copy link
Member Author

example result...

@a1012112796 I still think we should not combine error and sucess into a single responce
500 for generic error, 422 if input is infalid, 404 if something do not exist, ...
200/201 if you successfully added reviewrequest 204 if you removed it

I know it, your style is ok if this api only allow add or remove one reviewer in one time , but now I follow github style to allow add or remove more than one, then if the result have some not successfull result because of permission wrong or reviewer is not exist, I think we should let users know which one is fail ,the reason ,and which one is success. Only 422 or 200 feedback does not provide enough valid information when the request is partially successful and partially unsuccessful

services/issue/assignee.go Outdated Show resolved Hide resolved
zeripath added a commit that referenced this pull request Oct 12, 2020
Add team support for review request

Block #11355

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Andrew Thornton <art27@cantab.net>
@6543
Copy link
Member

6543 commented Oct 13, 2020

pleace resolve conflicts

@6543
Copy link
Member

6543 commented Oct 19, 2020

&pleace merge master in :)

Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling and English nits

routers/api/v1/repo/pull_review.go Outdated Show resolved Hide resolved
routers/api/v1/repo/pull_review.go Outdated Show resolved Hide resolved
routers/api/v1/repo/pull_review.go Outdated Show resolved Hide resolved
routers/api/v1/repo/pull_review.go Outdated Show resolved Hide resolved
routers/api/v1/repo/pull_review.go Outdated Show resolved Hide resolved
routers/api/v1/api.go Outdated Show resolved Hide resolved
templates/swagger/v1_json.tmpl Outdated Show resolved Hide resolved
templates/swagger/v1_json.tmpl Outdated Show resolved Hide resolved
routers/api/v1/repo/pull_review.go Outdated Show resolved Hide resolved
templates/swagger/v1_json.tmpl Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 20, 2020
@6543
Copy link
Member

6543 commented Oct 20, 2020

🚀

@techknowlogick techknowlogick merged commit b985037 into go-gitea:master Oct 20, 2020
ivanvc added a commit to ivanvc/gitea that referenced this pull request Oct 21, 2020
…ments-in-pull-request-label-style

* origin/master: (27 commits)
  [skip ci] Updated translations via Crowdin
  add more clarification to the issue-template.md (go-gitea#13235)
  go-version constraints ignore pre-releases (go-gitea#13234)
  [skip ci] Updated translations via Crowdin
  Update some JS dependencies (go-gitea#13222)
  Return the full rejection message and errors in flash errors (go-gitea#13221)
  Update heatmap fixtures to restore tests (go-gitea#13224)
  [skip ci] Updated translations via Crowdin
  Add review request api (go-gitea#11355)
  [skip ci] Updated translations via Crowdin
  When the git ref is unable to be found return broken pr (go-gitea#13218)
  Various arc-green fixes (go-gitea#13214)
  Show stale label for stale code comment which is marked as resolved (go-gitea#13213)
  Move install pages out of main macaron routes (go-gitea#13195)
  Use CSS Variables for fonts, remove postcss-loader (go-gitea#13204)
  [skip ci] Updated translations via Crowdin
  Align `SSH_AUTHORIZED_KEYS_BACKUP` var with the value in `app.ini` (go-gitea#13212)
  Fix size and clickable area on file table back link (go-gitea#13205)
  [skip ci] Updated translations via Crowdin
  Fix error in diff html rendering (go-gitea#13191)
  ...
@a1012112796 a1012112796 deleted the review_request_api branch October 22, 2020 15:36
@jolheiser jolheiser mentioned this pull request Nov 17, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants