-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Failed to unmarshal audit log entry #3016
Comments
Looking at this endpoint documentation: https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/orgs?apiVersion=2022-11-28#get-the-audit-log-for-an-organization To get to the bottom of this, would you mind contacting the GitHub Tech Support team and ask them how this field should be treated? Feel free to point them to this issue. Then, we would appreciate it if you could please report back here what your findings are and how we should handle this field. Thank you! |
Will do! And just in case it's unclear; the above entry is the result of updating the The json string is copy-paste from the response to |
There are a lot of inconsistencies between fields in audit log entries for different actions. IMO go-github shouldn't try to unmarshal any fields that aren't in the API definition because of inconsistencies like this. |
Current response from tech support:
|
New reply from tech support:
So, not really a reply at all. This is a major issue on our side. Do you by any chance have an ETA for the fix? |
You could speed the process along by reviewing the proposed fix: #3017. |
Using v57 of the package, we have a problem reading the audit log using
Organizations.GetAuditLog
.The
AuditEntry
struct has a fieldPermission *string
, but we have found a scenario in which the API returns a bool in the permission field (see example below). This naturally leads to the errorcannot unmarshal bool into Go struct field AuditEntry.permission of type string
, which basically blocks us from reading the audit log.The text was updated successfully, but these errors were encountered: