Repository navigation
feat: add missing rich_previews fields to the manifest type - #719
Conversation
domain_allowlist, allow_same_origin and slug.hide_display_id weren't in RichPreviews, so they were dropped when the manifest was read and every `slack app install` wiped them on the app. Fixes slackapi#718
|
Thanks for the contribution! Before we can merge this, we need @lucasingels to sign the Salesforce Inc. Contributor License Agreement. |
| EntityTypes []string `json:"entity_types,omitempty" yaml:"entity_types,flow,omitempty"` | ||
| IsActive bool `json:"is_active,omitempty" yaml:"is_active,flow,omitempty"` | ||
| DomainAllowlist []string `json:"domain_allowlist,omitempty" yaml:"domain_allowlist,flow,omitempty"` | ||
| AllowSameOrigin *bool `json:"allow_same_origin,omitempty" yaml:"allow_same_origin,omitempty"` |
There was a problem hiding this comment.
praise: ππ» Thanks for using pointers and omitempty for both booleans so an explicit false survives, matching the other optional fields in this file.
|
The PR changes look safe and tight, so I'm going to approve our CI/CD workflow to run. π§ͺ |
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #719 +/- ##
==========================================
- Coverage 78.10% 78.08% -0.03%
==========================================
Files 238 238
Lines 18096 18096
==========================================
- Hits 14134 14130 -4
- Misses 3962 3966 +4 β View full report in Codecov by Harness. π New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
β Thanks for the improvement @lucasingels and congrats on your first-time contribution to the project! π
Changelog
slack app installandslack deployno longer clear an app's Work Object embed settings (domain_allowlist,allow_same_origin,slug.hide_display_id).Summary
RichPreviewsonly hadentity_typesandis_active, so any otherrich_previewskeys in manifest.json got dropped when the CLI read it. The manifest update then replaced the app's settings without them, which emptied the embed domain allow list and turned off allow-same-origin and hide ID in slug every time we installed. Our Work Object embeds stopped showing until someone set them again on the app's Work Object Previews page.slack manifest diffdidn't catch it either, since it reads both sides through the same type.The two booleans are pointers like the other optional ones in this file, so an explicit
falseis kept.Fixes #718
Preview
slack manifest info --source remoteon our app (domain swapped for example.com).v4.11.0:
This branch:
Testing
go test ./...andgo tool golangci-lint runfalseslack manifest info --source remotewith a build of this branch against our app, output aboveNotes
These fields aren't in the manifest reference docs yet, but Slack includes them in the exported manifest once they're set on the Work Object Previews page.
Requirements