-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Implement Automated Changelog System for CI/CD Integration #1640
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
Merged
ksylvan
merged 16 commits into
danielmiessler:main
from
ksylvan:0720-changelog-during-ci-cd
Jul 21, 2025
Merged
Implement Automated Changelog System for CI/CD Integration #1640
ksylvan
merged 16 commits into
danielmiessler:main
from
ksylvan:0720-changelog-during-ci-cd
Jul 21, 2025
Conversation
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
## CHANGES - Add incoming PR preprocessing with validation - Implement release aggregation for incoming files - Create git operations for staging changes - Add comprehensive test coverage for processing - Extend GitHub client with validation methods - Support version detection from nix files - Include documentation for automated workflow - Add command flags for PR processing
- Add SilenceUsage to prevent help output on errors - Add GetStatusDetails method to show which files are dirty - Include direct commits in ProcessIncomingPRs for complete AI summaries
## CHANGES - Add .claude/ directory to gitignore exclusions - Update comment clarity for SilenceUsage flag - Remove redundant error handling in main function - Simplify command execution without explicit error checking
## CHANGES - Change `NoPush` config field to `Push` boolean - Update CLI flag from `--no-push` to `--push` - Add GitHub token authentication for push operations - Import `os` and HTTP transport packages - Reverse push logic to require explicit enable - Update documentation for new push behavior - Add automatic GitHub repository detection for auth
## CHANGES - Extract PR numbers from processed changelog files - Pass processed PRs map to direct commits function - Filter out commits already included via PR files - Reduce extra newlines in changelog version insertion - Add strconv import for PR number parsing - Prevent duplicate entries between PRs and direct commits - Improve changelog formatting consistency
fd4d068
to
9f242bc
Compare
…processing ## CHANGES - Pass version parameter to changelog generation workflow - Update ProcessIncomingPRs method to accept version string - Add commit SHA tracking to prevent duplicate entries - Modify process-prs flag to require version parameter - Improve changelog formatting with proper spacing - Update configuration to use ProcessPRsVersion string field - Enhance direct commit filtering with SHA exclusion - Update documentation to reflect version parameter requirement
9f242bc
to
91c1aca
Compare
…arity ## CHANGES - Rename ProcessIncomingPRs method to CreateNewChangelogEntry - Update method comment to reflect new name - Update main.go to call renamed method - Reduce newline spacing in content formatting
429a915
to
cab6df8
Compare
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.
Implement Automated Changelog System for CI/CD Integration
Summary
This pull request implements a comprehensive automated changelog system for CI/CD integration, adding new functionality to pre-process pull requests during development and aggregate changelog entries during release workflows.
Related Issues
Closes #1630
Files Changed
New Files Added
cmd/generate_changelog/incoming/1640.txt
- Example incoming changelog entry for PR Implement Automated Changelog System for CI/CD Integration #1640cmd/generate_changelog/internal/changelog/generator_test.go
- Test coverage for changelog generation functionalitycmd/generate_changelog/internal/changelog/processing.go
- Core processing logic for PR handling and release aggregationcmd/generate_changelog/internal/changelog/processing_test.go
- Comprehensive test suite for processing functionalitydocs/Automated-ChangeLog.md
- Technical specification and implementation detailsdocs/Automated-Changelog-Usage.md
- Developer guide and usage documentationModified Files
.github/workflows/update-version-and-create-tag.yml
- Updated CI/CD workflow to integrate changelog processing.gitignore
- Added.claude/
directory exclusion.vscode/settings.json
- Added new spell check words for project terminologycmd/generate_changelog/internal/config/config.go
- Extended configuration with new fields for PR processingcmd/generate_changelog/internal/git/walker.go
- Added git operations for staging, committing, and pushing changescmd/generate_changelog/internal/github/client.go
- Enhanced GitHub API client with validation methods and PR detailscmd/generate_changelog/internal/github/types.go
- Added PRDetails struct for comprehensive PR informationcmd/generate_changelog/main.go
- Added new command-line flags and processing modesCode Changes
Core Processing Logic (
processing.go
)GitHub API Enhancements (
client.go
)Git Operations (
walker.go
)CI/CD Workflow Integration
Reason for Changes
This implementation addresses the need for automated changelog generation in CI/CD pipelines while maintaining developer control over content quality. The system eliminates manual CHANGELOG.md editing, reduces merge conflicts, and ensures consistent formatting across releases.
Key motivations:
Impact of Changes
Positive Impacts
--incoming-pr
flag--process-prs
Potential Risks
Test Plan
The implementation includes comprehensive test coverage:
Unit Tests
generator_test.go
: Version detection, directory creation, changelog insertionprocessing_test.go
: File aggregation, error handling, validation logicIntegration Testing
Manual Testing
Additional Notes
Configuration Extensions
New configuration fields support the automated workflow:
IncomingPR
: PR number for pre-processingProcessPRsVersion
: Version string for release aggregationIncomingDir
: Directory path for incoming PR filesPush
: Enable automatic git push after commitsError Handling
Robust error handling covers:
Developer Workflow
generate_changelog --incoming-pr XXXX --ai-summarize
incoming/XXXX.txt
file--push
for automatic remote pushThe system maintains full backward compatibility while providing opt-in automation features that significantly improve the development and release process.