API v3 Pull Request Review `submitted_at`


#1

Is there any way to get the submitted_at timestamp for a pull request review in API v3?

Neither the “List reviews on a pull request” endpoint nor the “Get a single review” return a submitted_at or other timestamp indicating this.

I also checked the Issue events endpoint, but while there is a review_requested event type, there is no submitted_review event.

It looks like the PullRequestReview webhook event is the only possible way to obtain this information (the payload includes submitted_at), but unfortunately webhooks don’t let you get historical data.

Am I correct in observing that there is no API v3 endpoint that lets you get submitted reviews with the time they were submitted? And that there is no possible way to get historical data on submitted reviews creation time? Is there a reason for this?


#2

:wave: @abinoda

that there is no possible way to get historical data on submitted reviews creation time?

One way to infer the submitted at timestamp is to get the comments for a single review, each of which contains a created_at timestamp. The first comment’s created_at timestamp should correspond to the time the review was submitted.


#3

@jamesmartin Thanks James, I was looking into that… but does every submitted review regardless of type (APPROVE, REQUEST_CHANGES, or COMMENT) have at least one comment?


#4

@jamesmartin So… I just actually tested the “List reviews” API endpoint and IT DID return submitted_at :smile: :sunny:

I looks like the documentation for “List reviews” and “Get a single review” is missing the submitted_at and author_association properties when compared to the response I’m seeing. Here’s the raw response I’m getting: https://gist.github.com/abinoda/5927afd0f59900d9c9b4ebe7277a8209. If it’s helpful, here’s the pull request I’m testing on: https://github.com/nodable/auth-service/pull/8


#5

@tarebyte @jmilas wanted to ping you about this too just in case!


#6

@abinoda thanks for following up. I’ll get the documentation for those endpoints updated!