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

Remove ambiguous fields from AuditEntry #3017

Merged
merged 14 commits into from
Dec 18, 2023
Merged

Conversation

WillAbides
Copy link
Contributor

closes #3016

In #3016 (comment) I suggested that AuditEntry fields should be limited to what is in the openapi description. I have since spoken with some people at GitHub and learned that the openapi description is outdated and there are discrepancies between the description and the json being returned by the api.

Instead of limiting AuditEntry to what is in the openapi description, this PR reduces AuditEntry to fields that are known to be the same type across all events regardless of the openapi description. The rest of the fields are now available in AuditEntry.AdditionalFields as a map[string]any

This is a breaking change.

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (005e6c8) 97.88% compared to head (3a42286) 97.71%.

Files Patch % Lines
github/orgs_audit_log.go 52.08% 15 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3017      +/-   ##
==========================================
- Coverage   97.88%   97.71%   -0.17%     
==========================================
  Files         151      151              
  Lines       13024    13072      +48     
==========================================
+ Hits        12748    12773      +25     
- Misses        196      211      +15     
- Partials       80       88       +8     

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

@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 Dec 5, 2023
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, @WillAbides !
Just a few nits, please, then we will be ready for a second LGTM+Approval from any other contributor to this repo before merging.

github/orgs_audit_log.go Outdated Show resolved Hide resolved
github/orgs_audit_log.go Outdated Show resolved Hide resolved
github/orgs_audit_log.go Outdated Show resolved Hide resolved
github/orgs_audit_log.go Outdated Show resolved Hide resolved
github/orgs_audit_log.go Outdated Show resolved Hide resolved
github/orgs_audit_log.go Outdated Show resolved Hide resolved
github/orgs_audit_log.go Outdated Show resolved Hide resolved
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, @WillAbides !
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 Dec 17, 2023
@gmlewis
Copy link
Collaborator

gmlewis commented Dec 17, 2023

Thank you @valbeat !
Merging.

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 17, 2023

Sorry, I'm going to have to work on this one because of all the other recent merges. Hopefully tomorrow I can work on it.

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 18, 2023

Note that the new Referrer field added in #3032 has been moved in this PR to the AdditionalFields map.

@gmlewis gmlewis merged commit a354a6c into google:master Dec 18, 2023
5 of 7 checks passed
gmlewis pushed a commit to o-sama/go-github that referenced this pull request Dec 19, 2023
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.

Failed to unmarshal audit log entry
9 participants