Skip to content

fix: Fix for GHES to allow variations in GitHub Actions bot user id #222

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
merged 2 commits into from
Jun 10, 2025

Conversation

virgofx
Copy link
Member

@virgofx virgofx commented Jun 10, 2025

This pull request introduces several changes across the codebase to improve handling of GitHub Actions bot information, refactor constants, enhance test coverage, and ensure asynchronous handling of functions. The most significant updates include replacing hardcoded bot email and ID with dynamic retrieval from the GitHub API, refactoring constants for clarity, and converting several functions to asynchronous operations.

GitHub Actions Bot Information Updates:

  • src/utils/github.ts: Added a new function getGitHubActionsBotEmail to dynamically retrieve the GitHub Actions bot email address using the GitHub API. This replaces hardcoded values for better adaptability across environments.
  • src/releases.ts and src/wiki.ts: Updated Git configuration commands to use the dynamically retrieved bot email instead of the hardcoded GITHUB_ACTIONS_BOT_EMAIL. [1] [2]

Constants Refactoring:

  • src/utils/constants.ts: Removed GITHUB_ACTIONS_BOT_USER_ID and GITHUB_ACTIONS_BOT_EMAIL, replacing them with GITHUB_ACTIONS_BOT_USERNAME for consistency and clarity.

Test Enhancements:

Asynchronous Function Updates:

  • src/wiki.ts, src/releases.ts, and src/main.ts: Converted commitAndPushWikiChanges and related calls to asynchronous functions for improved reliability and error handling. [1] [2]

Simplification of Release Comment Logic:

  • src/pull-request.ts: Simplified the hasReleaseComment function by removing the check for GITHUB_ACTIONS_BOT_USER_ID, allowing the function to focus solely on the presence of the release marker.

virgofx added 2 commits June 10, 2025 18:18
…ed logic; add getGitHubActionsBotEmail function for dynamic email retrieval
Copy link

📋 Release Plan

Module Type Latest
Version
New
Version
Release
Details
tf-modules/animal patch v1.0.0 🆕 Initial Release
tf-modules/kms patch v1.0.0 🆕 Initial Release
tf-modules/s3-bucket-object patch v1.0.0 🆕 Initial Release
tf-modules/vpc-endpoint patch v1.0.0 🆕 Initial Release
tf-modules/zoo patch v1.0.0 🆕 Initial Release

📝 Changelog

tf-modules/animal/v1.0.0 (2025-06-10)

  • 🔀PR #222 - fix: Fix for GHES to allow variations in GitHub Actions bot user id

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

  • 🔀PR #222 - fix: Fix for GHES to allow variations in GitHub Actions bot user id

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

  • 🔀PR #222 - fix: Fix for GHES to allow variations in GitHub Actions bot user id

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

  • 🔀PR #222 - fix: Fix for GHES to allow variations in GitHub Actions bot user id

tf-modules/zoo/v1.0.0 (2025-06-10)

  • 🔀PR #222 - fix: Fix for GHES to allow variations in GitHub Actions bot user id

Wiki Statusℹ️

✅ Enabled

Automated Tag/Release Cleanupℹ️

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

Powered by:   techpivot/terraform-module-releaser

Copy link

@virgofx virgofx merged commit 981ba04 into main Jun 10, 2025
24 checks passed
@virgofx virgofx deleted the fix-github-bot-user-id-for-ghes branch June 10, 2025 19:05
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.

1 participant