Skip to content

Conversation

@javierbrea
Copy link
Collaborator

@javierbrea javierbrea commented Jun 10, 2025

markdown-confluence-sync: DryRun option

Description

  • Add dryRun option to markdown-confluence-sync, enabling to run the sync process without actually sending the content to Confluence. This is useful for testing the configuration and markdown files without making changes in Confluence.

closes #57

Agreement

Please check the following boxes after you have read and understood each item.

  • I have read the CONTRIBUTING document
  • I have read the CODE_OF_CONDUCT document
  • I accept that, by signing the Contributor License Agreement through a comment in the PR, my Github user name will be stored by in a branch of this repository for future reference.

In case this is your first contribution to this project, you will also have to add a comment with the following text: "I have read the CLA Document and I hereby sign the CLA", otherwise the PR status will fail and our bot will request you to add it. Once you have signed it in a PR, you will not have to sign it again for future contributions.

This comment was marked as outdated.

@github-actions
Copy link

github-actions bot commented Jun 10, 2025

Check SPDX headers

✅ 242 files have valid headers.

@javierbrea javierbrea requested review from MiguelJMC7 and rnowm June 10, 2025 09:04
@github-actions
Copy link

github-actions bot commented Jun 10, 2025

Check License Compliance

✅ There are 1434 dependencies with allowed licenses.

⚠️ There are 5 dependencies with dangerous licenses:

✅ Result: Valid licenses

@javierbrea javierbrea requested a review from Copilot June 10, 2025 09:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new dryRun option to markdown-confluence-sync, enabling users to run a configuration test without sending changes to Confluence.

  • Adds unit tests and component tests to verify the dryRun behavior.
  • Enhances the configuration types and option definitions to support a dry run mode.
  • Updates documentation, changelog, and versioning to reflect the new feature.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
components/markdown-confluence-sync/test/unit/specs/MarkdownConfluenceSync.test.ts Added a unit test ensuring no synchronization call is made in dryRun mode
components/markdown-confluence-sync/test/component/specs/dryRun.spec.ts Added component tests to validate exit code and log output in dryRun mode
components/markdown-confluence-sync/test/component/fixtures/dry-run/markdown-confluence-sync.config.cjs Introduced configuration for dryRun testing
components/markdown-confluence-sync/src/lib/MarkdownConfluenceSync.types.ts Defined types for the dryRun option
components/markdown-confluence-sync/src/lib/MarkdownConfluenceSync.ts Integrated the dryRun option into the sync flow with a conditional early return
components/markdown-confluence-sync/README.md Documented the new dryRun option
components/markdown-confluence-sync/CHANGELOG.md Logged the addition of the dryRun feature
Comments suppressed due to low confidence (2)

components/markdown-confluence-sync/src/lib/MarkdownConfluenceSync.ts:172

  • [nitpick] Consider clarifying in the documentation the distinction between the global 'dryRun' option and 'confluence.dryRun' to avoid potential user confusion.
const dryRun = this._dryRunOption.value;

components/markdown-confluence-sync/test/unit/specs/MarkdownConfluenceSync.test.ts:45

  • [nitpick] Ensure that 'customConfluenceSync' is properly mocked so that the test reliably validates that no synchronization is attempted when dryRun is enabled.
expect(customConfluenceSync.sync).not.toHaveBeenCalled();

Copy link
Contributor

@JavierIbanezSoloaga JavierIbanezSoloaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@javierbrea javierbrea merged commit 9c10d0c into release Jun 10, 2025
11 checks passed
@javierbrea javierbrea deleted the feat/dry-run branch June 10, 2025 11:36
@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants