-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
PullRequestReviewsEnforcementRequest.DismissalRestrictionsRequest set to nil results in 422 from GH #664
Comments
And I hope that |
I ran into this issue as well in #674. See go-github/test/integration/repos_test.go Lines 111 to 113 in e062a8c
When this issue is resolved, that integration test can be fixed too. |
… be an empty object if nil. Fixes google#664
…ionsRequest set to nil results in 422 from GH
…[] -> {} I've driveby added the require owner commit attribute as an omitmissing as it was missing from the API. Because it is omitmissing it is not a breaking change. Added spew library which helped me discover that we were comparing returned URLs from the AdminEnforcement object. None of the other objects in the API care about their URLs so I just removed that.
I have PR #703 in to fix this. It seems to be failing because I added a new library go-spew which is essentially the recursive %+v I always wanted and that doesn't get pulled in during the build. |
Tests are passing :) |
See my comment at #703 (comment). I think in order to resolve this bug, we need to figure out how to reproduce a successful response from GitHub using REST API. Then, once we have that, we can work on the Go code to fix the code, if needed. |
…[] -> {} I've driveby added the require owner commit attribute as an omitmissing as it was missing from the API. Because it is omitmissing it is not a breaking change. Added spew library which helped me discover that we were comparing returned URLs from the AdminEnforcement object. None of the other objects in the API care about their URLs so I just removed that.
From my understanding of #703, the way to get a successful response from GitHub is to perform the API call involving DismissalRestrictionsRequest on an organization-owned repository. It doesn't work on personal repositories and gives 422 in that case. /cc @beiriannydd |
I just started seeing a 422 when an empty array is passed for In any case, I have a support request out to GitHub to try to find out what the expected behavior is/should be. If the docs are wrong, and the property should be null (instead of an empty array), I'll provide a PR to make the change. Update: I just tried passing |
It seems to me that GitHub has updated the docs by now, and I'm not aware of what exactly we're waiting on them for, so removed that label. I think PR #791 will resolve this issue (let me know if not). |
Fixes google/go-github#664 id type changed from int to int64
Fixes google/go-github#664 id type changed from int to int64
- Fixes google/go-github#664 - id type changed from int to int64
According to doc user is able to pass nil to disable
DismissalRestrictions
and looking at method below thisnil
is converted to empty array.Seems that this is not working properly because
results in:
and '422 Invalid request' from GH
@navarrano could you please take a look?
The text was updated successfully, but these errors were encountered: