Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Rewrite in TypeScript #175

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

codykhon
Copy link
Contributor

@codykhon codykhon commented Mar 21, 2025

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!

codykhon and others added 2 commits March 21, 2025 17:57
- introduced typescript
- improved overall project structure

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
version: 3.0.0
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.

None yet

1 participant