BranchRestrictions Create and Get should not return BranchRestrictions
DataDavD opened this issue · 2 comments
hey @ktrysmt I took a further look at #144 and it seems like the BranchRestrictions Create and Get methods need a little work as well. I got rid of the unneeded interface type assertion for the Create tests (since it no longer returns an interface testing a type is redundant given compilation checks types for us) but still had issues with nil pointer deference in the tests which is probably due to the fact that the decode function is returning the same BranchRestrictions type but not specifying the *client.
From my review it appears that a BranchRestrictions Response type needs to be created and the decode function should return that instead.
Is that OK if I work on fixing/adding this stuff?????? The branch/PR for this Issue will close both issues related to branch restrictions.
Thanks in advance.
Update/FYI I'm currently working on PR to fix this issue, so please no one duplicate this work. PR should be ready this weekend.
Yes, it seems a good idea. I want to try to see a POC or PullRequest about it.