Implemented automated changelog generation#444
Merged
Conversation
|
@Juwonlo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
There was a problem hiding this comment.
Pull request overview
Implements automated changelog generation tied to git tags and adds supporting CI automation, while also introducing new explainability/privacy patterns in the recommendation system and adding logging strategy documentation plus a NestJS logger module/service.
Changes:
- Add a Node-based changelog generator script that parses conventional commit messages between tags and updates
CHANGELOG.md. - Add a GitHub Actions workflow to run the generator on tag pushes and commit the updated changelog.
- Refactor recommendation explainability to a Strategy pattern, add a privacy manager Builder, and introduce logging strategy docs + logger module/service.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/generate-changelog.js | New changelog generator script using git tags + conventional commits |
| .github/workflows/generate-changelog.yml | Workflow to run generator on tag pushes / manual trigger and push results |
| recommendation-system/src/privacy/privacy.ts | Adds PrivacyComplianceManagerBuilder for configurable construction |
| recommendation-system/src/explainability/explainability.ts | Introduces ExplanationStrategy + concrete strategies and refactors dominant-signal explanation |
| docs/logger.service.ts | Adds a NestJS LoggerService implementation with structured JSON output in production |
| docs/logger.module.ts | Adds a NestJS global module exporting the logger service |
| docs/LOGGING_STRATEGY.md | Adds documented logging standards and schema |
| docs/DESIGN_PATTERNS.md | Documents Strategy/Builder/Facade/DI patterns used in the codebase |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| chore: { title: '🔧 Chores & Maintenance', items: [] }, | ||
| }; | ||
|
|
||
| const commitRegex = /^(feat|fix|docs|style|refactor|perf|test|chore|security)(?:\(([^)]+)\))?:\s*(.+)$/i; |
Comment on lines
+8
to
+11
| inputs: | ||
| version: | ||
| description: 'Version to generate changelog for (e.g., v1.0.0)' | ||
| required: false |
Comment on lines
+27
to
+29
| - name: Generate Changelog | ||
| run: node scripts/generate-changelog.js | ||
|
|
Comment on lines
+19
to
+24
| private shouldLog(level: string): boolean { | ||
| const levels = ['debug', 'info', 'warn', 'error']; | ||
| const configuredIndex = levels.indexOf(this.logLevel.toLowerCase()); | ||
| const targetIndex = levels.indexOf(level); | ||
| return targetIndex >= configuredIndex; | ||
| } |
Comment on lines
+47
to
+53
| const logEntry = { | ||
| timestamp, | ||
| level, | ||
| context: currentContext, | ||
| message: typeof message === 'object' ? JSON.stringify(message) : message, | ||
| ...(Object.keys(metadata).length > 0 ? { data: metadata } : {}), | ||
| }; |
Comment on lines
+182
to
+183
| if (!userProfile) return ''; // Guard clause | ||
|
|
| required: false | ||
|
|
||
| jobs: | ||
| changelog: |
| try { | ||
| return execSync(command, { encoding: 'utf-8' }).trim(); | ||
| } catch (error) { | ||
| return ''; |
Comment on lines
+36
to
+40
| previousTag = tags[1]; | ||
| gitLogCmd = `git log ${previousTag}..${currentVersion} --format="%H|%s"`; | ||
| } else { | ||
| gitLogCmd = `git log ${currentVersion} --format="%H|%s"`; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #377
Fixed Issue #377