Skip to content

Conversation

@cysp
Copy link
Owner

@cysp cysp commented Nov 2, 2025

No description provided.

@cysp cysp requested a review from Copilot November 2, 2025 11:34
@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

❌ Patch coverage is 82.44973% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.17%. Comparing base (7bca3ba) to head (93542d8).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/provider/resource_environment.go 75.62% 29 Missing and 10 partials ⚠️
internal/provider/resource_environment_alias.go 76.12% 28 Missing and 9 partials ⚠️
...ntful-management-go/testing/handler_environment.go 72.97% 5 Missing and 5 partials ⚠️
...management-go/testing/handler_environment_alias.go 72.97% 5 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
- Coverage   88.54%   88.17%   -0.37%     
==========================================
  Files         181      194      +13     
  Lines        8505     9052     +547     
==========================================
+ Hits         7531     7982     +451     
- Misses        655      722      +67     
- Partials      319      348      +29     
Flag Coverage Δ
contentful-management-go 7.91% <1.55%> (-0.57%) ⬇️
test 45.76% <17.55%> (-1.82%) ⬇️
testacc-1.12.* 82.05% <82.44%> (+0.06%) ⬆️
testacc-1.13.* 82.05% <82.44%> (+0.06%) ⬆️
testaccmocked-1.12.* 86.19% <82.44%> (-0.25%) ⬇️
testaccmocked-1.13.* 86.19% <82.44%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
contentful-management-go 85.88% <84.49%> (-0.13%) ⬇️
provider 88.74% <81.81%> (-0.42%) ⬇️
terraform-plugin-framework-reflection 82.02% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

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 adds support for managing Contentful environments as a Terraform resource. The implementation provides full CRUD operations for environment resources and includes corresponding test infrastructure.

  • Adds contentful_environment resource with fields for space_id, environment_id, and name
  • Implements Create, Read, Update, Delete operations with proper version tracking
  • Includes comprehensive test coverage with mocked Contentful API responses

Reviewed Changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/provider/resource_environment.go Core resource implementation with CRUD operations and identity schema
internal/provider/resource_environment_schema.go Terraform schema definition for environment resource
internal/provider/environment_model.go Data model structures for environment resource
internal/provider/environment_model_request.go Request transformation from model to API fields
internal/provider/environment_model_response.go Response transformation from API to model
internal/provider/resource_environment_test.go Acceptance tests for resource operations and import
internal/provider/contentful_provider.go Registration of new environment resource
internal/provider/testdata/TestAccEnvironmentResource/* Terraform configuration files for tests
internal/provider/testdata/TestAccEnvironmentImport/* Terraform configuration files for import tests
internal/contentful-management-go/testing/* Mock server implementation for environment operations
internal/contentful-management-go/openapi/* OpenAPI schema definitions for environment and environment alias
internal/contentful-management-go/oas_*_gen.go Generated OpenAPI client code for environment operations
docs/resources/environment.md Resource documentation with usage examples
examples/resources/contentful_environment/resource.tf Example Terraform configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cysp cysp requested a review from Copilot November 2, 2025 11:48
Copy link

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

Copilot reviewed 55 out of 55 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cysp cysp force-pushed the cysp/environment-alias branch 2 times, most recently from 0774349 to 8eb73c9 Compare November 3, 2025 11:15
@cysp cysp requested a review from Copilot November 3, 2025 11:15
Copy link

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

Copilot reviewed 57 out of 57 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cysp cysp force-pushed the cysp/environment-alias branch from 8eb73c9 to b322764 Compare November 3, 2025 11:19
@cysp cysp marked this pull request as ready for review November 3, 2025 11:34
@cysp cysp force-pushed the cysp/environment-alias branch from b322764 to 26dd10e Compare November 4, 2025 20:58
@cysp cysp force-pushed the cysp/environment-alias branch from 26dd10e to 93542d8 Compare November 4, 2025 21:03
@cysp cysp requested a review from Copilot November 4, 2025 21:04
Copy link

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

Copilot reviewed 53 out of 53 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cysp cysp enabled auto-merge (rebase) November 4, 2025 21:07
@cysp cysp merged commit a29f31b into main Nov 4, 2025
23 checks passed
@cysp cysp deleted the cysp/environment-alias branch November 4, 2025 21:08
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.

2 participants