feat(export): add attachment exclude patterns - #229
Merged
pchuri merged 1 commit intoAug 28, 2026
Conversation
pchuri
approved these changes
Aug 28, 2026
pchuri
left a comment
Owner
There was a problem hiding this comment.
Thanks for the contribution, @AlexanderTheGrey — this is a well-executed PR. 🎉
What I like:
- Extracting the duplicated attachment-filtering logic (single-page and recursive paths) into a shared
filterAttachmentshelper is a nice cleanup on its own — the existing--pattern→--referenced-only→ all precedence is preserved exactly, with exclusions applied last as documented. - The comma-separated parsing (
split(',')→ trim → filter) mirrors the existing--excludeoption for page titles, so the CLI stays consistent. - Solid test coverage: multiple patterns, case-insensitive matching (
recording.MOVvs*.mov), interaction with--pattern/--referenced-only/--skip-attachments, recursive export, empty-pattern handling, and the exclude-everything edge case. - Docs updated in all three places (README examples, command table, and SKILL.md).
Verified locally:
matchesPatterninlib/confluence-client.jsgenuinely supports pattern arrays and defaults to case-insensitive matching viaglobToRegExp, so the helper's array usage is safe (the tests mock the client, so I double-checked the real implementation).- Full test suite (1128 tests) and ESLint pass on the branch; CI is green across Node 18/20/22.
LGTM — approving.
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
# [2.22.0](v2.21.0...v2.22.0) (2026-08-28) ### Features * **export:** add attachment exclude patterns ([#229](#229)) ([b1bb913](b1bb913))
|
🎉 This PR is included in version 2.22.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Description
Adds
--exclude-attachments <patterns>toconfluence export, allowing comma-separated glob patterns to exclude matching attachments from single-page and recursive exports.Type of Change
Testing
Checklist
Additional Context
--exclude-attachments <patterns>toconfluence exportExample
Testing
Added coverage for multiple patterns, case-insensitive matching, interaction with existing attachment filters, recursive exports,
--skip-attachments, and excluding all matching attachments.