-
-
Notifications
You must be signed in to change notification settings - Fork 832
Add triage labels to GitHub issue templates #804
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
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughGitHub issue templates updated: feature requests now preselect “enhancement” and “triage”; bug report labels reformatted to block YAML. Logger initialization changed: production uses only Cloud Logging (no console); development uses Console with timestamp/JSON. Logger level and public API unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Dev/Prod Env
participant App as Application Code
participant Logger as Logger Factory
participant Console as Console Transport
participant Cloud as Cloud Logging (LoggingWinston)
Dev->>Logger: initialize()
alt NODE_ENV=production
Logger->>Cloud: attach transport
note right of Cloud: Console transport omitted to avoid duplicates
else development/other
Logger->>Console: attach transport (timestamp + JSON)
end
App->>Logger: logger.info/error(...)
alt production
Logger->>Cloud: write log
else development
Logger->>Console: write log
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
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.
Summary of Changes
Hello @yamadashy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request streamlines issue management and refines application logging. It introduces automated 'triage' labeling for new GitHub issues, ensuring better categorization and initial review. Concurrently, it optimizes the logging setup to provide distinct behaviors for production and development environments, enhancing log clarity and efficiency.
Highlights
- Automated Triage Label for Feature Requests: The feature request template now automatically includes the 'triage' label, ensuring all new feature requests are immediately categorized for initial review.
- YAML Formatting Correction in Bug Report Template: The bug report template's 'triage' label definition was adjusted to conform to proper YAML array syntax, improving template consistency and reliability.
- Environment-Specific Logging Configuration: The logging utility has been enhanced to use Cloud Logging only in production environments, preventing redundant logs, while console logging is now specifically enabled for development.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
Claude encountered an error —— View job I'll analyze this and get back to you. |
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 adds triage labels to GitHub issue templates to improve issue management workflow and ensures proper categorization of new issues for review and prioritization. The PR also includes an unrelated logging configuration change that separates production and development logging transports.
- Added
triage
label to both feature request and bug report issue templates - Fixed YAML array syntax in bug report template labels
- Refactored logger configuration to use different transports for production vs development environments
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
.github/ISSUE_TEMPLATE/01_feature_request.yml | Added triage label to existing enhancement label list |
.github/ISSUE_TEMPLATE/02_bug_report.yml | Fixed YAML syntax and ensured triage label is properly formatted |
website/server/src/utils/logger.ts | Refactored to use Cloud Logging only in production, console logging in development |
website/server/src/utils/logger.ts
Outdated
|
||
// Configure transports based on environment | ||
function createLogger() { | ||
const transports: winston.transport[] = [ | ||
new winston.transports.Console({ | ||
format: winston.format.combine(winston.format.timestamp(), winston.format.json()), | ||
}), | ||
]; | ||
const transports: winston.transport[] = []; | ||
|
||
// Add Cloud Logging transport only in production | ||
if (process.env.NODE_ENV === 'production') { | ||
// In production, use only Cloud Logging to avoid duplicates | ||
const loggingWinston = new LoggingWinston(); | ||
transports.push(loggingWinston); | ||
} else { | ||
// In development, use console logging | ||
transports.push( | ||
new winston.transports.Console({ | ||
format: winston.format.combine(winston.format.timestamp(), winston.format.json()), | ||
}), | ||
); | ||
} |
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.
[nitpick] This logging configuration change appears unrelated to the PR's stated purpose of adding triage labels to GitHub issue templates. Consider moving this change to a separate PR focused on logging improvements to maintain clear commit history and easier rollbacks if needed.
Copilot uses AI. Check for mistakes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #804 +/- ##
=======================================
Coverage 87.41% 87.41%
=======================================
Files 113 113
Lines 6493 6493
Branches 1331 1331
=======================================
Hits 5676 5676
Misses 817 817 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Deploying repomix with
|
Latest commit: |
fee25e8
|
Status: | ✅ Deploy successful! |
Preview URL: | https://0069a48e.repomix.pages.dev |
Branch Preview URL: | https://chore-triage.repomix.pages.dev |
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.
Code Review
This pull request makes two distinct changes. First, it adds the triage
label to the GitHub issue templates, which will help with issue management. The changes to the YAML files are correct and consistent. Second, it refactors the logger configuration to use different transports for production and development environments, correctly preventing duplicate logs in production. This is a valuable improvement.
For future pull requests, it would be helpful to describe all significant changes in the description. The logger refactoring is a good change but wasn't mentioned. Also, consider separating unrelated changes into different pull requests to keep them focused.
I've added one suggestion to make the logger configuration code more concise and maintainable.
website/server/src/utils/logger.ts
Outdated
const transports: winston.transport[] = []; | ||
|
||
// Add Cloud Logging transport only in production | ||
if (process.env.NODE_ENV === 'production') { | ||
// In production, use only Cloud Logging to avoid duplicates | ||
const loggingWinston = new LoggingWinston(); | ||
transports.push(loggingWinston); | ||
} else { | ||
// In development, use console logging | ||
transports.push( | ||
new winston.transports.Console({ | ||
format: winston.format.combine(winston.format.timestamp(), winston.format.json()), | ||
}), | ||
); | ||
} |
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.
While the current logic is correct, it can be made more concise and maintainable. By defining an isProduction
constant, you can use a ternary operator to assign the transports. This constant can then be reused on line 23 for setting the log level, avoiding a duplicate environment check and improving readability.
const isProduction = process.env.NODE_ENV === 'production';
const transports: winston.transport[] = isProduction
? [new LoggingWinston()]
: [
new winston.transports.Console({
format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
}),
];
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.
Actionable comments posted: 0
🧹 Nitpick comments (4)
.github/ISSUE_TEMPLATE/02_bug_report.yml (1)
3-4
: Consider also pre-labeling bug reports with “bug”Adding the canonical “bug” label alongside “triage” improves filtering and keeps symmetry with the feature template (“enhancement” + “triage”).
Apply this minimal diff:
labels: - triage + - bug
website/server/src/utils/logger.ts (3)
10-13
: Production-only Cloud Logging: confirm intent and add a safe fallbackRouting prod logs exclusively to LoggingWinston eliminates duplicate logs, but if credentials/misconfiguration occur, logs may be dropped. Consider a defensive fallback to Console when instantiation fails, so you never lose production logs.
Proposed change (keeps your current behavior, adds fallback):
- // In production, use only Cloud Logging to avoid duplicates - const loggingWinston = new LoggingWinston(); - transports.push(loggingWinston); + // In production, prefer Cloud Logging; fall back to console to avoid losing logs + try { + const loggingWinston = new LoggingWinston(); + transports.push(loggingWinston); + } catch { + transports.push( + new winston.transports.Console({ + format: winston.format.combine( + winston.format.timestamp(), + winston.format.json() + ), + }), + ); + }Action to verify:
- Deploy to a staging/prod-like env with NODE_ENV=production and confirm entries appear in Cloud Logging; temporarily break ADC to validate the Console fallback still surfaces logs.
7-7
: Nit: avoid shadowing “winston.transports” with local “transports”Renaming the local array reduces cognitive load when reading code that also references winston.transports.
- const transports: winston.transport[] = []; + const loggerTransports: winston.transport[] = []; @@ - transports.push(loggingWinston); + loggerTransports.push(loggingWinston); @@ - transports.push( + loggerTransports.push( new winston.transports.Console({ format: winston.format.combine(winston.format.timestamp(), winston.format.json()), }), ); @@ - return winston.createLogger({ + return winston.createLogger({ level: process.env.NODE_ENV === 'production' ? 'info' : 'debug', - transports, + transports: loggerTransports, });
15-19
: Preserve error stack traces in dev console outputIncluding winston.format.errors({ stack: true }) ensures Error instances preserve stack in console logs without extra plumbing.
new winston.transports.Console({ - format: winston.format.combine(winston.format.timestamp(), winston.format.json()), + format: winston.format.combine( + winston.format.errors({ stack: true }), + winston.format.timestamp(), + winston.format.json() + ), }),
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.github/ISSUE_TEMPLATE/01_feature_request.yml
(1 hunks).github/ISSUE_TEMPLATE/02_bug_report.yml
(1 hunks)website/server/src/utils/logger.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test (macos-latest, 23.x)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
.github/ISSUE_TEMPLATE/01_feature_request.yml (1)
5-5
: LGTM: “triage” label added to feature requestsThe YAML list syntax is correct and will pre-apply both enhancement and triage labels.
If the repository doesn’t already have a “triage” label, GitHub will attempt to create it on first use (given permissions). Please confirm the label exists with the desired color/description.
Add triage label to both feature request and bug report templates to ensure all new issues are properly categorized for initial review and prioritization.
a636018
to
fee25e8
Compare
This PR adds triage labels to both GitHub issue templates to ensure all new issues are properly categorized for initial review and prioritization.
Changes
triage
label alongside existingenhancement
labeltriage
label is properly formatted in YAML array syntaxBenefits
triage
labelChecklist
npm run test
npm run lint