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

API: Add pull review endpoints #11224

Merged
merged 40 commits into from May 2, 2020

Conversation

6543
Copy link
Member

@6543 6543 commented Apr 26, 2020

  • GET /repos/:owner/:repo/pulls/:pull_number/reviews ListPullReviews
  • GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id GetPullReview
  • GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments GetPullReviewComments
  • POST /repos/:owner/:repo/pulls/:pull_number/reviews CreatePullReview
  • POST /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id SubmitPullReview
  • DELETE /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id DeletePullReview

ToDo:

  • Add Tests
    • ListPullReviews
    • GetPullReview
    • GetPullReviewComments
    • CreatePullReview
    • SubmitPullReview
    • DeletePullReview

take things of #10005

and finish it ...

close #5733
close #10005

Copy link
Member Author

@6543 6543 left a comment

Choose a reason for hiding this comment

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

.

modules/structs/pull_review.go Show resolved Hide resolved
modules/structs/pull_review.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 26, 2020
@6543

This comment has been minimized.

models/review.go Outdated Show resolved Hide resolved
models/review.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #11224 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11224   +/-   ##
=======================================
  Coverage   43.76%   43.76%           
=======================================
  Files         607      607           
  Lines       86807    86807           
=======================================
  Hits        37995    37995           
  Misses      44120    44120           
  Partials     4692     4692           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28d4f34...28d4f34. Read the comment docs.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 30, 2020
Copy link
Contributor

@davidsvantesson davidsvantesson left a comment

Choose a reason for hiding this comment

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

Only some small nits.

routers/api/v1/repo/pull_review.go Outdated Show resolved Hide resolved
routers/api/v1/repo/pull_review.go Show resolved Hide resolved
routers/api/v1/repo/pull_review.go Show resolved Hide resolved
6543 and others added 2 commits May 1, 2020 16:33
Co-authored-by: David Svantesson <davidsvantesson@gmail.com>
Copy link
Contributor

@davidsvantesson davidsvantesson left a comment

Choose a reason for hiding this comment

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

You can consider my review comments, but they are merely opinions so I approve this.

@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 May 1, 2020
@lafriks lafriks merged commit c97494a into go-gitea:master May 2, 2020
@lafriks lafriks deleted the api-review-endpoints_5733 branch May 2, 2020 00:21
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* API: Added pull review read only endpoints

* Update Structs, move Conversion, Refactor

* refactor

* lint & co

* fix lint + refactor

* add new Review state, rm unessesary, refacotr loadAttributes, convert patch to diff

* add DeletePullReview

* add paggination

* draft1: Create & submit review

* fix lint

* fix lint

* impruve test

* DONT use GhostUser for loadReviewer

* expose comments_count of a PullReview

* infent GetCodeCommentsCount()

* fixes

* fix+impruve

* some nits

* Handle Ghosts 👻

* add TEST for GET apis

* complete TESTS

* add HTMLURL to PullReview responce

* code format as per @lafriks

* update swagger definition

* Update routers/api/v1/repo/pull_review.go

Co-authored-by: David Svantesson <davidsvantesson@gmail.com>

* add comments

Co-authored-by: Thomas Berger <loki@lokis-chaos.de>
Co-authored-by: David Svantesson <davidsvantesson@gmail.com>
@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.

Adding PR Reviews through API
8 participants