Skip to content

feat: add GHES compatibility, update terraform-docs to v0.20.0, and improve utility functions #208

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

virgofx
Copy link
Member

@virgofx virgofx commented May 3, 2025

This pull request introduces comprehensive improvements across documentation, configuration, testing, and utility functions, with a primary focus on enhancing GitHub Enterprise Server (GHES) compatibility and modernizing dependencies.

🚀 Key Features

GHES Compatibility Enhancements

  • Added comprehensive GitHub Enterprise Server support documentation
  • Updated feature descriptions to clearly indicate compatibility with both GitHub.com and GHES environments
  • Enhanced Wiki initialization instructions for enterprise deployments

Dependency Updates

  • Upgraded terraformDocsVersion from previous version to v0.20.0 for improved Terraform documentation generation
  • Updated all related test cases and configurations to support the new version

📝 Documentation Improvements

  • README.md: Added detailed step-by-step instructions for enabling and initializing GitHub Wiki
  • Enhanced GHES support documentation with clear compatibility statements
  • Improved feature descriptions to highlight enterprise environment support

🧪 Testing Enhancements

Expanded Test Coverage

  • Context Tests: Updated log call expectations to accommodate new initialization steps
  • Pull Request Tests: Added comprehensive test scenarios including:
  • Module removal handling
  • Wiki failure recovery
  • Branding exclusion logic
  • Improved error messaging and comment clarity
  • Terraform Module Tests: Enhanced validation for individual modules and refined exclusion logic
  • Terraform Docs Tests: Updated version compatibility checks

🛠️ Utility Function Improvements

String Utilities Refactor

  • Breaking Change: Deprecated removeTrailingDots function
  • New Feature: Introduced removeTrailingCharacters for flexible trailing character removal
  • Supports multiple character types beyond just dots
  • Expanded test coverage for edge cases and complex module naming scenarios

📊 Impact Summary

  • Compatibility: Full GHES support enabling enterprise adoption
  • Maintainability: Updated dependencies and improved test coverage
  • Flexibility: Enhanced utility functions for better string manipulation
  • Documentation: Clearer setup instructions and feature descriptions

@virgofx virgofx force-pushed the 202-support-github-enterprise-server-with-custom-gh-api-base-urls branch 3 times, most recently from d15acfe to 1057fdd Compare May 31, 2025 22:36
@virgofx virgofx force-pushed the 202-support-github-enterprise-server-with-custom-gh-api-base-urls branch 2 times, most recently from e87db55 to b966252 Compare May 31, 2025 23:45
@virgofx virgofx changed the title 202 support GitHub enterprise server with custom gh api base urls feat: enhance GHES compatibility, update terraform-docs to v0.20.0, and improve utility functions May 31, 2025
@virgofx virgofx force-pushed the 202-support-github-enterprise-server-with-custom-gh-api-base-urls branch 14 times, most recently from 56051c8 to e200b68 Compare June 1, 2025 18:11
@virgofx virgofx changed the title feat: enhance GHES compatibility, update terraform-docs to v0.20.0, and improve utility functions feat: add GHES compatibility, update terraform-docs to v0.20.0, and improve utility functions Jun 1, 2025
@virgofx virgofx force-pushed the 202-support-github-enterprise-server-with-custom-gh-api-base-urls branch 2 times, most recently from e4adf29 to 84018fe Compare June 1, 2025 18:46
@virgofx virgofx force-pushed the 202-support-github-enterprise-server-with-custom-gh-api-base-urls branch 4 times, most recently from 6943b69 to ca666ad Compare June 1, 2025 22:02
@virgofx virgofx marked this pull request as ready for review June 1, 2025 22:02
@virgofx virgofx requested a review from Copilot June 1, 2025 22:03
@virgofx virgofx self-assigned this Jun 1, 2025
@virgofx virgofx added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Jun 1, 2025
Copy link

@Copilot Copilot AI left a 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 pull request enhances GHES compatibility, updates dependency versions (including terraform-docs v0.20.0), and modernizes utility functions and documentation. Key changes include updates to branding and templating in constants and README, refactoring of utility functions (e.g. replacing removeTrailingDots with removeTrailingCharacters), and comprehensive adjustments to tests and release comment logic.

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/file.ts Minor cleanup by removing commented-out code
src/utils/constants.ts Updated branding HTML for better GitHub/GHES presentation
src/terraform-module.ts Replaced deprecated removeTrailingDots and added initial release logic
src/pull-request.ts Refined PR comment content and formatting adjustments
src/main.ts Enhanced changelog generation commentary
src/context.ts Added API URL support and improved logging
package.json Upgraded dependency versions and added new scripts
action.yml Updated terraform-docs default version
tests/utils/string.test.ts Adjusted tests for deprecation and new utility functions
tests/pull-request.test.ts Expanded tests for release plan comments and module removal scenarios
... (other test and config files) Consistent updates across tests, mocks, and documentation

- Add proper handling for GHES custom API endpoints via environment variables
- Enhance initializeContext to include API URL detection for GHES environments
- Improve wiki checkout process for GHES custom domain configurations
- Update formatModuleSource to handle SSH and HTTPS conversions for GHES URLs
- Fix automated tag cleanup logic to work with GHES repositories
- Add changelog sections to PR comments with GHES compatibility
- Update tests to support GHES functionality and edge cases
- Add comprehensive documentation for GHES configuration and usage
- Small tweaks to improve branding clarity on mobile
@virgofx virgofx force-pushed the 202-support-github-enterprise-server-with-custom-gh-api-base-urls branch from ca666ad to 2bbd9c2 Compare June 1, 2025 22:08
Copy link

github-actions bot commented Jun 1, 2025

Release Plan

Module Release Type Latest Version New Version
tf-modules/kms initial v1.0.0
tf-modules/s3-bucket-object initial v1.0.0
tf-modules/vpc-endpoint initial v1.0.0

Changelog

tf-modules/kms/v1.0.0 (2025-06-01)

  • 🔀PR #208 - feat: add GHES compatibility, update terraform-docs to v0.20.0, and improve utility functions

tf-modules/s3-bucket-object/v1.0.0 (2025-06-01)

  • 🔀PR #208 - feat: add GHES compatibility, update terraform-docs to v0.20.0, and improve utility functions

tf-modules/vpc-endpoint/v1.0.0 (2025-06-01)

  • 🔀PR #208 - feat: add GHES compatibility, update terraform-docs to v0.20.0, and improve utility functions

Wiki Statusℹ️

✅ Enabled

Automated Tag Cleanupℹ️

⏸️ Existing tags and releases will be preserved as the delete-legacy-tags flag is disabled.

Powered by:   techpivot/terraform-module-releaser

Copy link

sonarqubecloud bot commented Jun 1, 2025

@virgofx virgofx merged commit 3ec1340 into main Jun 1, 2025
26 checks passed
@virgofx virgofx deleted the 202-support-github-enterprise-server-with-custom-gh-api-base-urls branch June 1, 2025 22:18
@release-preview release-preview bot mentioned this pull request Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant