Repository navigation
Show each email's attachments on rule decision, result and test rows - #820
Merged
Merged
Conversation
Sync the attachments and attachment_count fields on rule decisions, the rule results on one email, rule test results and the emails a compared test changes, regenerate the clients, and print a short attachments line under each row in list-decisions, list-decisions-on-my-mail, list-results and test.
[Medium impact] The PR appears safe to merge; no new blocking issues were found. Reviews (3) · Last reviewed commit: "Give the Go decision fixture the attachm..." · Reviewed by Greptile |
|
Found 2 test failures on Blacksmith runners: Failures
|
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.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
What
Email rule decision and result rows now say what each email carried, so a reader judging a rule can see that an email had files without opening it.
Spec and clients (synced from the API's served document, attachment fields only):
attachments: [{ name, description }] | nullandattachment_count: number | nullon rule decisions (listEmailRuleDecisions,listEmailRuleDecisionsOnMyMail), once at the top level oflistEmailRuleResults, on the emails a compared test lists as changed, and on decidedtestEmailRuleresults, where they replaceattachment_namesandattachment_descriptions.[]means the email has none;nullmeans the caller is not shown whether it has any.CLI (stderr only; the JSON on stdout is unchanged):
email-rules list-decisionsandemail-rule-oversight list-decisions-on-my-mail: one line under each row, such as2 attachments: rate-card-2026.pdf (Contractor pay rates by role), logo.png,no attachmentsfor none, and nothing when not known.email-rules list-results:Email: ...with the same summary, after any notes the answer carries.email-rules test: the same line under matched and not matched results and under the emails the changes lists name, replacing the old file-name line.No version bump and no publish.
Tests
cli-node/tests/oclif/rule-row-attachments.test.ts(counts, cuts, quoting, unsafe text), plus new cases inemail-rule-listings.test.ts(decision rows, list-results report and command) andemail-rule-authoring.test.ts(test report and changes lists).