Repository navigation
Conversation
❤️ Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1703 +/- ##
============================================
+ Coverage 73.95% 74.00% +0.05%
- Complexity 4752 4773 +21
============================================
Files 487 488 +1
Lines 14811 14866 +55
Branches 1536 1552 +16
============================================
+ Hits 10953 11002 +49
- Misses 2943 2945 +2
- Partials 915 919 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request parses
details.actionin audit logs as either a string or an object.details.actionas a string for some actions, such as"update"forusergroup_updated, and as an object withresolutionandnotifyfor others, such asapp_allowlist_rule_created. With the currentStringtype, anygetLogspage that includes the object form fails to parse withJsonSyntaxException: Expected a string but was BEGIN_OBJECT.LogsResponse.Details.actionis now aLogsResponse.DetailsActionthat holds either form. A newGsonAuditLogsDetailsActionFactory, registered inGsonFactory, reads both, the same waysucceededUsersandfailedUsersreadUserIDs.failOnUnknownPropertieson, unknown keys in the object form raise an error.AAARuleActionNotifygainsvalues.This is a breaking change for code that reads the field as a string. To migrate, replace
details.getAction()withdetails.getAction().getStringValue(), or readgetResolution()andgetNotify()for the object form.This is the base of a stack:
Testing
With an org admin token that has
auditlogs:read:slack.audit(token).getLogs(r -> r.action("app_allowlist_rule_created"))parses, andgetDetails().getAction().getResolution()is set.slack.audit(token).getLogs(r -> r.action("usergroup_updated"))parses, andgetDetails().getAction().getStringValue()is"update".Category
Requirements
🤖 Generated with Claude Code