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 PR completely rewrites using TypeScript, replacing the previous implementation. Additionally, it introduces linting and modern GitHub Actions packages to ensure best practices and cleaner code.
Why This Change?
• Better Maintainability – Strong typing, improved structure, and modularization make future updates easier.
• Future-Proofing – The rewrite follows GitHub Actions best practices, ensuring long-term compatibility.
• Improved Error Handling – Enhanced validation and structured error reporting improve debugging and stability.
• Code Quality Improvements – Introduced a linter to enforce consistent and clean code.
Key Changes
• Full migration to TypeScript for better type safety.
• Added Biome(https://biomejs.dev/) to enforce linting
• Replaced legacy eventJson parsing with @actions/github context for better maintainability.
• Updated dependencies
Changes may introduce new bugs. Therefore new version should be 3.0.0
Future Considerations
• Refactor Gitleaks class – It should only be responsible for checking and installing gitleaks. Caching, tooling, and path handling should be moved out for better modularity.
• Introduce specific schema types for payload validation, ensuring strict type safety when handling GitHub event data.
• Write automated tests to improve reliability and prevent regressions.
Feedback and suggestions are welcome!