terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

refactor: migrate resource_github_actions_environment_variable to tflog

Open texasich opened this issue 5 months ago • 3 comments

Replace Go standard log package with HashiCorp structured tflog for consistent logging across the provider.

Changes:

  • Replace log import with tflog import
  • Convert log.Printf to tflog.Info with structured fields

Resolves #3070 (partial — this PR covers one file)

This is a resubmission of #3325 (was closed due to inactivity / capacity).


Before the change?

resource_github_actions_environment_variable.go uses Go's standard log.Printf for logging, which produces unstructured output inconsistent with the rest of the provider.

After the change?

Logging uses HashiCorp's tflog.Info with structured key-value fields (variable_id), consistent with the pattern established in other migrated files like resource_github_membership.go.

Pull request checklist

  • [x] Schema migrations have been created if needed
  • [x] Acceptance tests have been run (no behavioral changes — logging only)
  • [x] Documentation has been updated if needed (N/A — internal refactor)

texasich avatar Jun 05 '26 00:06 texasich

👋 Hi, and thank you for this contribution!

This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.

You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions.


🤖 This is an automated message.

github-actions[bot] avatar Jun 05 '26 00:06 github-actions[bot]

Please reopen #3325 instead of creating a new PR

deiga avatar Jun 05 '26 03:06 deiga

@deiga — closing this duplicate per your request. Reopening #3325 (the original PR) now.

texasich avatar Jun 05 '26 04:06 texasich