Skip to content

Parse 'reviewed' event object 'state' property - #1886

Merged
gmlewis merged 1 commit into
masterfrom
unknown repository
Jul 8, 2021
Merged

gmlewis merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jun 8, 2021

Copy link
Copy Markdown

The Timeline Events API can return a reviewed event object when listing events for a pull request. One of the properties of this object is state, which tells you the state of a submitted review.

The values state can have are:

  • commented
  • changes_requested
  • approved

This PR adds this field to the Timeline struct defined in issues_timeline.go to make it possible to tell the state of a review when listing pull request events.

'reviewed' event objects returned by the Timeline Events API have a
'state' property that tells you the state of a submitted review. This
commit adds the code to parse this property.
@google-cla

google-cla Bot commented Jun 8, 2021

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla Bot added the cla: no label Jun 8, 2021
@ghost

ghost commented Jun 8, 2021

Copy link
Copy Markdown
Author

@googlebot I signed it!

@google-cla google-cla Bot added cla: yes Indication that the PR author has signed a Google Contributor License Agreement. and removed cla: no labels Jun 8, 2021
@ghost

ghost commented Jun 8, 2021

Copy link
Copy Markdown
Author

Merging this PR would fix issue #1885.

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @campesel !
LGTM.

Awaiting second LGTM before merging.

@gmlewis
gmlewis requested a review from wesleimp June 8, 2021 22:57
@ghost

ghost commented Jun 11, 2021

Copy link
Copy Markdown
Author

@gmlewis Thanks for the approval!

@ghost

ghost commented Jun 14, 2021

Copy link
Copy Markdown
Author

@wesleimp Looks good to you?

@gmlewis

gmlewis commented Jun 24, 2021

Copy link
Copy Markdown
Collaborator

Friendly ping @wesleimp

@Parker77 Parker77 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indication that the PR author has signed a Google Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants