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.
This pull request refactors and modernizes the "Require Changeset" GitHub Action by replacing the previous Bash-based workflow with a modular, testable Node.js implementation. The changes introduce a service-oriented architecture, improved error handling, and comprehensive documentation for utility classes. The update also adds automated tests to ensure reliability and maintainability.
Require Changeset Action Refactor:
.github/actions/require-changeset/action.yamlis removed and replaced by a Node.js implementation using.github/scripts/require-changeset/require-changeset.jsand supporting modules. This allows for better modularity, error handling, and testability. [1] [2]Service Architecture & GitHub Integration:
ChangesetRequirementServicein.github/scripts/require-changeset/services/changeset-requirement.service.js, which encapsulates logic for validating changeset requirements, skipping checks for bots/releases/labels, and fetching changed files using multiple strategies for robustness. [1] [2]Testing and Reliability:
.github/scripts/require-changeset/require-changeset.test.jsusing Node.js test and mock APIs, verifying service exports and integration logic.Utility Class Improvements and Documentation:
FSUtil(.github/scripts/utils/fs.util.js) andPackageUtil(.github/scripts/utils/package.util.js), including detailed JSDoc comments and examples for all methods, improving developer experience and maintainability. [1] [2] [3] [4] [5]Robust Git Operations:
GitUtilnow supports multiple fallback strategies for detecting changed files between branches/commits, increasing reliability of the changeset check in various CI scenarios.