Skip to content

Conversation

@ReenigneArcher
Copy link
Member

Description

Moved inline scripts in release_changelog and release_create actions to separate JavaScript modules (changelog.js and cleanup.js) for better maintainability and testability. Added comprehensive unit tests for both modules. This refactor improves code organization and enables easier testing and future enhancements.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (800e536) to head (42e2921).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##            master       #47    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            4         6     +2     
  Lines          620       798   +178     
  Branches        57        79    +22     
==========================================
+ Hits           620       798   +178     
Flag Coverage Δ
Linux 100.00% <100.00%> (ø)
Windows 82.45% <100.00%> (+5.03%) ⬆️
macOS 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
actions/release_changelog/changelog.js 100.00% <100.00%> (ø)
actions/release_create/cleanup.js 100.00% <100.00%> (ø)

… scripts

Moved inline scripts in release_changelog and release_create actions to separate JavaScript modules (changelog.js and cleanup.js) for better maintainability and testability. Added comprehensive unit tests for both modules. This refactor improves code organization and enables easier testing and future enhancements.
@ReenigneArcher ReenigneArcher force-pushed the refactor/modular-js-scripts branch from 104abd5 to 18aac2a Compare October 17, 2025 15:36
Extracted common mock and console setup logic into a new tests/testUtils.js utility module. Updated test_changelog.test.js and test_cleanup.test.js to use these shared utilities, reducing duplication and improving maintainability.
@ReenigneArcher ReenigneArcher force-pushed the refactor/modular-js-scripts branch from 8063710 to 4d66ec8 Compare October 17, 2025 17:20
Replaces manual release object construction in tests with new createMockRelease and createMockReleases helpers for consistency and reduced duplication. Adds these helper functions to testUtils.js and updates all relevant test files to use them.
Introduces helper functions in testUtils.js for setting up and verifying branch creation and delete operations in tests. Updates release_changelog and release_create test suites to use these helpers, reducing duplication and improving readability.
Added setupCleanupEnv and setupChangelogWorkflow utility functions to centralize environment variable and mock setup in tests. Updated release changelog and cleanup tests to use these new utilities, improving readability and maintainability. Broadened ESLint Jest config to include all test JS files.
@ReenigneArcher ReenigneArcher force-pushed the refactor/modular-js-scripts branch 3 times, most recently from bd7c251 to 7c3ce6b Compare October 17, 2025 18:07
Consolidated multiple individual tests for compareVersionTags into a single parameterized test using test.each, improving test maintainability and reducing code duplication.
@sonarqubecloud
Copy link

@ReenigneArcher ReenigneArcher marked this pull request as ready for review October 17, 2025 19:17
@ReenigneArcher ReenigneArcher merged commit 8c750b6 into master Oct 17, 2025
66 checks passed
@ReenigneArcher ReenigneArcher deleted the refactor/modular-js-scripts branch October 17, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants