Skip to content

Remove ambiguous fields from AuditEntry - #3017

Merged
gmlewis merged 14 commits into
google:masterfrom
WillAbides:auditentry
Dec 18, 2023
Merged

Remove ambiguous fields from AuditEntry#3017
gmlewis merged 14 commits into
google:masterfrom
WillAbides:auditentry

Conversation

@WillAbides

Copy link
Copy Markdown
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.

@codecov

codecovBot commented Dec 5, 2023

Copy link
Copy Markdown

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%.

FilesPatch %Lines
github/orgs_audit_log.go52.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.

@gmlewisgmlewis 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

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment threadgithub/orgs_audit_log.go Outdated
Comment threadgithub/orgs_audit_log.go Outdated
Comment threadgithub/orgs_audit_log.go Outdated
Comment threadgithub/orgs_audit_log.go Outdated
Comment threadgithub/orgs_audit_log.go Outdated
Comment threadgithub/orgs_audit_log.go Outdated
Comment threadgithub/orgs_audit_log.go Outdated

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

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.

@valbeatvalbeat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@gmlewisgmlewis removed the NeedsReview PR is awaiting a review before merging. label Dec 17, 2023
@gmlewis

Copy link
Copy Markdown
Collaborator

Thank you @valbeat !
Merging.

@gmlewis

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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:masterDec 18, 2023
gmlewis pushed a commit to o-sama/go-github that referenced this pull request Dec 19, 2023
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API ChangePR 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

@WillAbides@gmlewis@valbeat@peter-aglen@tomasz-adam-skrzypczak@ngoduykhanh@rufusnufus@Kiyo510@bn4t