-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix!: Fix field selection and bugs in ProjectsV2 GET endpoints #3809
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
fix!: Fix field selection and bugs in ProjectsV2 GET endpoints #3809
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3809 +/- ##
=======================================
Coverage 92.32% 92.33%
=======================================
Files 194 194
Lines 13984 13990 +6
=======================================
+ Hits 12911 12917 +6
Misses 884 884
Partials 189 189 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @stephenotalora!
Please add testBadOptions to all your new unit tests to improve the code coverage.
…t-and-patch-project-item-fix
Good catch, @gmlewis 🙇🏼 fixed! I was deep in the bug fixes and glossed over that. 👍 |
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @stephenotalora!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @alexandear - @zyfy29
github/projects.go
Outdated
| // It contains the field ID and the new value to set. | ||
| // | ||
| // GitHub API docs: https://docs.github.com/rest/projects/items#update-project-item-for-organization | ||
| type ProjectV2FieldUpdate struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not?
| type ProjectV2FieldUpdate struct { | |
| type UpdateProjectV2Field struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed as part of 3bbb927
|
@alexandear @gmlewis I need to make an adjustment to the API payload for fields before moving this forward. We identified a discrepancy between the documented schema and the payload currently returned by the server. I’m converting this PR back to draft while I align the affected structs with the updated documentation. I should be able to reopen the PR tomorrow and will share the new commits once they're ready. I'll also address recent feedback, Thanks for your patience! |
@gmlewis I’ve resolved the discrepancy noted earlier in commit 3bbb927 and verified the changes against production data S2S using For concrete examples, click to expand
Without the fix in 3bbb927, the request resulted in unmarshal errors due to mismatched object shapes. |
…t-and-patch-project-item-fix
|
OK, so this is now ready for merging, correct, @stephenotalora? |
Yes, correct, ready to go, tested quite extensively S2S today 👍🏼 |
|
I'm OK. |
|
Thank you, @stephenotalora and @alexandear! |
Thanks so much for getting this merged, @gmlewis! 🙏🏼 Do you happen to know when the next release might be planned? I’d love to start using the latest changes downstream. Thanks again 🙇🏼 |
We just made two quick releases in a row based on requests, but we could probably do another release after #3814 gets merged. |
BREAKING CHANGE:
UpdateProjectItemOptions.Fieldis now[]*ProjectV2FieldUpdate.Discovered these issues while integrating the related project item APIs exposed in
V77.Fixes bugs in the implementation of support for field selection and updates in the following project item endpoints:
GetOrganizationProjectItemandGetUserProjectItem.UpdateOrganizationProjectItemandUpdateUserProjectItem.Adds or updates tests to verify correct handling of these cases.
Covers:
https://docs.github.com/en/rest/projects/items?apiVersion=2022-11-28
Related REST API docs:
Complements: #3793