-
Notifications
You must be signed in to change notification settings - Fork 0
feat: added variables to logs #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
Conversation
claudiacodacy
commented
Dec 5, 2025
- adding variables to the log for better degguing
Codacy's Analysis Summary0 new issue (≤ 0 issue) Review Pull Request in Codacy →
|
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
The PR passes all Codacy quality gates, with no new issues and a decrease in complexity. The changes focus on improving log messages for better debugging.
About this PR
- There's a small typo in the PR description. 'degguing' should be 'debugging'.
💡 Codacy uses AI. Check for mistakes.
| if (excludeKeywords.length > 0) { | ||
| if (excludeKeywords.some(k => matchesKeyword(title, k))) { | ||
| return log("Skipping PR with excluded keywords"); | ||
| return log("Skipping PR with excluded keywords"+`\ntitle = ${title}`+`\nexcludeKeywords = ${excludeKeywords}`); |
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.
⚪ LOW RISK
Suggestion: Combining string literals with template literals can be less readable. Consider using a single template literal for the entire log message.
This might be a simple fix:
| return log("Skipping PR with excluded keywords"+`\ntitle = ${title}`+`\nexcludeKeywords = ${excludeKeywords}`); | |
| return log(`Skipping PR with excluded keywords\ntitle = ${title}\nexcludeKeywords = ${excludeKeywords}`); |
| if (requiredKeywords.length > 0) { | ||
| if (!requiredKeywords.some(k => matchesKeyword(title, k))) { | ||
| return log("Skipping PR without required keywords"); | ||
| return log("Skipping PR without required keywords"+`\ntitle = ${title}`+`\nrequiredKeywords = ${requiredKeywords}`); |
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.
⚪ LOW RISK
Suggestion: Combining string literals with template literals can be less readable. Consider using a single template literal for the entire log message.
This might be a simple fix:
| return log("Skipping PR without required keywords"+`\ntitle = ${title}`+`\nrequiredKeywords = ${requiredKeywords}`); | |
| return log(`Skipping PR without required keywords\ntitle = ${title}\nrequiredKeywords = ${requiredKeywords}`); |
| const author = pr.user?.login || ""; | ||
| const isBot = pr.user?.type === "Bot" || author.endsWith("[bot]"); | ||
| if (isBot) return log("Skipping bot PR"); | ||
| if (isBot) return log("Skipping bot PR"+`\nauthor = ${author}`+`\nisBot = ${isBot}`); |
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.
⚪ LOW RISK
Suggestion: Combining string literals with template literals can be less readable. Consider using a single template literal for the entire log message.
| if (!includeDrafts) { | ||
| const isDraft = pr.draft === true; | ||
| if (isDraft) return log("Skipping draft PR"); | ||
| if (isDraft) return log("Skipping draft PR"+`\nisDraft = ${isDraft}`); |
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.
⚪ LOW RISK
Suggestion: Combining string literals with template literals can be less readable. Consider using a single template literal for the entire log message.