Skip to content
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

Turn RequiredStatusChecks Checks and Contexts into pointers #3070

Merged
merged 4 commits into from Feb 11, 2024
Merged

Turn RequiredStatusChecks Checks and Contexts into pointers #3070

merged 4 commits into from Feb 11, 2024

Conversation

emmahsax
Copy link
Contributor

@emmahsax emmahsax commented Feb 9, 2024

By making the both Contexts and Checks pointers, the JSON will allow sending an empty slice as [] to the GitHub API, instead of taking those out and sending nil or null.

This will actually solve both #2976 and #2467.

I also clarified in the comments that empty slices are allowed, implying that if the user wants to set no checks or contexts, to allow passing an empty slice.

These changes allow the Go API to properly reflect the behavior of the GitHub API.

Copy link

google-cla bot commented Feb 9, 2024

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

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@emmahsax emmahsax changed the title Turn RequiredStatusChecks Checks and Contexts into pointers Turn RequiredStatusChecks Checks and Contexts into pointers Feb 9, 2024
@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Feb 10, 2024
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @emmahsax !
Please run the commands in step 4 found in CONTRIBUTING.md and then we should be ready for a second LGTM+Approval before merging.

Copy link

codecov bot commented Feb 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2b8c7fa) 97.72% compared to head (4741b40) 98.00%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3070      +/-   ##
==========================================
+ Coverage   97.72%   98.00%   +0.27%     
==========================================
  Files         153      153              
  Lines       13390    10803    -2587     
==========================================
- Hits        13085    10587    -2498     
+ Misses        215      126      -89     
  Partials       90       90              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @emmahsax !
LGTM.

Awaiting second LGTM+Approval from any other contributor to this repo before merging.

Copy link
Contributor

@valbeat valbeat left a comment

Choose a reason for hiding this comment

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

LGTM!

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Feb 11, 2024
@gmlewis
Copy link
Collaborator

gmlewis commented Feb 11, 2024

Thank you, @valbeat !
Merging.

@gmlewis gmlewis merged commit dd4d2a1 into google:master Feb 11, 2024
7 checks passed
@ttomsu
Copy link
Contributor

ttomsu commented Feb 29, 2024

Hi @gmlewis ! Could we get this released in a v60 release soon? Thank you!

@gmlewis
Copy link
Collaborator

gmlewis commented Feb 29, 2024

Hi @gmlewis ! Could we get this released in a v60 release soon? Thank you!

@ttomsu - this is now available in: https://github.com/google/go-github/releases/tag/v60.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants