github icon indicating copy to clipboard operation
github copied to clipboard

fix the PullRequest object so it can parse

Open adnelson opened this issue 8 years ago • 8 comments

I'm not positive this covers every variant of a pull request event, but prior to this change the FromJSON instance failed to decode the example json (which is where the JSON I included here comes from) in the API docs, and now it does.

adnelson avatar Jul 31 '17 21:07 adnelson

Not sure why the PR builder is unable to find fixtures/pull-request.json; it's in the same directory as other fixtures and it worked locally

adnelson avatar Aug 01 '17 14:08 adnelson

What do you mean by using the real world response as a fixture?

adnelson avatar Aug 01 '17 23:08 adnelson

@adnelson e.g. the current version of result for that the PR in your fixture https://api.github.com/repos/baxterthehacker/public-repo/pulls/1 has assignees list.

Real-world: don't copy old fixtures from somewhere, grab new ones from the API.

phadej avatar Aug 02 '17 08:08 phadej

@phadej I think the problem was that I was confusing the PullRequest and PullRequestEvent types. I'll add fixtures for each case and test them separately

adnelson avatar Aug 02 '17 14:08 adnelson

Alright, so I added three more fixtures, one that I had of the pull request event, and the two that you had given for pull requests, making four test cases in total. I added some logic which allows either the assignee or assignees keys, or both, to be present in a pull request blob.

adnelson avatar Aug 02 '17 16:08 adnelson

@phadej any thoughts on this?

adnelson avatar Aug 12 '17 19:08 adnelson

@phadej just checking in here...

adnelson avatar Oct 03 '17 04:10 adnelson

@adnelson : New maintainer here.
Are you willing to fix the conflicts so that this PR can be merged (assuming it is still serving its purpose)?

andreasabel avatar Apr 19 '22 15:04 andreasabel