Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 1, 2025

Overview

This PR implements a new optional feature flag export-changelog-files that allows users to export CHANGELOG.md files for each Terraform module directly in the repository. This addresses issue #275 by providing an alternative changelog format that complements the existing wiki functionality.

Motivation

Users managing multiple Terraform module repositories needed a standardized way to track module changes that:

  • Lives within the repository itself (version controlled)
  • Works without requiring wiki access or permissions
  • Provides offline access to changelog history
  • Can be easily parsed by CI/CD pipelines
  • Follows standard CHANGELOG.md conventions

Implementation

When export-changelog-files: true is configured, the action will:

  1. Generate CHANGELOG.md files - Creates a CHANGELOG.md file in each module's directory that needs a release
  2. Include full history - Combines the new release entry with all historical releases from previous versions
  3. Automatic commits - Commits and pushes the generated files using GitHub Actions bot credentials
  4. Independent operation - Works with or without wiki generation enabled

Example CHANGELOG.md Output

# Changelog - modules/aws/vpc

All notable changes to this module will be documented in this file.

## `v1.2.0` (2024-11-05)

- :twisted_rightwards_arrows:**[PR #123](https://github.com/owner/repo/pull/123)** - Add VPC flow logs
- feat: Add flow logs support
- docs: Update README with flow logs examples

## `v1.1.0` (2024-10-15)

- :twisted_rightwards_arrows:**[PR #100](https://github.com/owner/repo/pull/100)** - Add NAT gateway
- feat: Support NAT gateway configuration

Usage

- name: Terraform Module Releaser
  uses: techpivot/terraform-module-releaser@v1
  with:
    export-changelog-files: true  # Enable CHANGELOG.md export
    disable-wiki: false            # Both can be enabled simultaneously

Key Features

  • Backward Compatible - Disabled by default, existing workflows unchanged
  • Flexible - Works independently of wiki generation
  • Automatic - Commits and pushes changes automatically
  • Complete History - Includes both new and historical release notes
  • Per-Module - Each module gets its own CHANGELOG.md file
  • Standard Format - Follows common changelog conventions

Changes Summary

  • Core Implementation: Added generateChangelogFiles() and commitAndPushChangelogFiles() functions
  • Configuration: New export-changelog-files input parameter with type definitions and validation
  • Documentation: Updated README.md with feature description, examples, and benefits
  • Tests: Added 6 comprehensive test cases covering various scenarios

Testing

  • ✅ All existing tests pass (484/484)
  • ✅ 6 new test cases for changelog file generation
  • ✅ 100% code coverage for new functions
  • ✅ TypeScript compilation successful
  • ✅ All linting checks pass
  • ✅ CodeQL security scan: 0 vulnerabilities
  • ✅ Backward compatibility verified

Benefits

  1. In-Repository Documentation - Changelogs live with the code in version control
  2. Offline Access - No need for wiki access to view history
  3. CI/CD Integration - Can be easily parsed programmatically
  4. Standards Compliance - Standard CHANGELOG.md format recognized across the ecosystem
  5. Flexible Usage - Use wiki, CHANGELOG.md files, or both simultaneously

Closes #275

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/techpivot/techpivot%2Fterraform-module-releaser/languages
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Research @techpivot/terraform-module-releaser/issues/275 and attempt to implement the request.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Research @techpivot/terraform-module-releaser/issues/275 and attempt to implement the request. Add export-changelog-files feature to generate CHANGELOG.md files for Terraform modules Oct 1, 2025
@Copilot Copilot AI requested a review from virgofx October 1, 2025 04:57
Copilot finished work on behalf of virgofx October 1, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow CHANGELOG.md export as an optional feature flag

2 participants