-
Notifications
You must be signed in to change notification settings - Fork 3
refactor: applied formater, linter, typecheck #9
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
base: main
Are you sure you want to change the base?
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
6512007 to
a71ac00
Compare
7e8dc62 to
0d0089a
Compare
Signed-off-by: Evzen Gasta <evzen.ml@seznam.cz>
0d0089a to
9786a6a
Compare
There was a problem hiding this 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 applies code formatting, linting, and type checking fixes to improve code quality and consistency. The changes include adding proper TypeScript types, replacing manual argument parsing with minimist library, improving type safety, and fixing various linting issues.
- Introduced
KeyValueNumberinterface for better type safety - Replaced manual argument parsing with minimist library
- Added proper TypeScript types and imports
- Fixed various code formatting and linting issues
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| release-notes/release-notes-preparator.ts | Added KeyValueNumber interface, improved type safety, fixed string parsing and regular expressions |
| release-notes/release-notes-preparator.spec.ts | Added proper type imports, improved mock typing, and fixed type assertions |
| release-notes/generate-release-notes.ts | Refactored argument parsing using minimist, improved code organization with helper functions |
| release-notes/generate-release-notes.spec.ts | Updated tests to use minimist mocks instead of direct argv manipulation |
| package.json | Added minimist and related type dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (!issueMatch) return pr; | ||
|
|
||
| const issueNumber = issueMatch[0].split('#')[1]; | ||
| const issueNumber = parseInt(issueMatch[0].split('#')[1]); |
Copilot
AI
Sep 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parseInt call is missing a radix parameter. This should be parseInt(issueMatch[0].split('#')[1], 10) to ensure base-10 parsing and avoid potential issues with leading zeros.
| const issueNumber = parseInt(issueMatch[0].split('#')[1]); | |
| const issueNumber = parseInt(issueMatch[0].split('#')[1], 10); |
| const matchTest = pr.title.match(/\(test/i); | ||
| if (matchTest) { | ||
| const matchTest = /\(test/i.exec(pr.title); | ||
| if (matchTest?.[1]) { |
Copilot
AI
Sep 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition checks for matchTest?.[1] but the regex /\\(test/i doesn't have a capturing group, so matchTest[1] will always be undefined. The condition should be if (matchTest) instead.
| if (matchTest?.[1]) { | |
| if (matchTest) { |
What does this PR do?
Applies formater, linter and typecheck
Screenshot / video of UI
What issues does this PR fix or reference?
How to test this PR?
Run fomater, linter and typecheck