feat: Add Projects V2 resources#3541
Open
TorinAsakura wants to merge 8 commits into
Open
Conversation
|
👋 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. |
Contributor
There was a problem hiding this comment.
Pull request overview
These provider review instructions are being used.
Findings
- HIGH: Multi-step creation failures can leave unmanaged Projects V2 projects or items.
- MEDIUM: Read-after-write calls risk stale failures and excess API usage; repository links are not rename-safe.
- MEDIUM: Schema descriptions and diagnostic validators are missing, and mocked tests do not validate GraphQL variables.
Adds six Terraform resources for managing GitHub Projects V2 through GraphQL.
Changes:
- Adds projects, fields, items, field values, repository links, and team links.
- Introduces application use cases and GraphQL gateways.
- Adds examples, generated documentation, and mocked tests.
Reviewed changes
Copilot reviewed 101 out of 101 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
templates/resources/team_project.md.tmpl |
Team-link documentation template |
templates/resources/project.md.tmpl |
Project documentation template |
templates/resources/project_repository.md.tmpl |
Repository-link documentation template |
templates/resources/project_item.md.tmpl |
Item documentation template |
templates/resources/project_item_field_value.md.tmpl |
Field-value documentation template |
templates/resources/project_field.md.tmpl |
Field documentation template |
internal/infrastructure/providers/github/projects/v2/team/link/mapper.go |
Maps team links |
internal/infrastructure/providers/github/projects/v2/team/link/gateway.go |
Team-link GraphQL gateway |
internal/infrastructure/providers/github/projects/v2/team/link/dto.go |
Team GraphQL DTOs |
internal/infrastructure/providers/github/projects/v2/repository/link/mapper.go |
Maps repository links |
internal/infrastructure/providers/github/projects/v2/repository/link/gateway.go |
Repository-link gateway |
internal/infrastructure/providers/github/projects/v2/repository/link/dto.go |
Repository GraphQL DTOs |
internal/infrastructure/providers/github/projects/v2/project/mapper.go |
Maps projects |
internal/infrastructure/providers/github/projects/v2/project/mapper_test.go |
Tests project mapping |
internal/infrastructure/providers/github/projects/v2/project/gateway.go |
Project GraphQL gateway |
internal/infrastructure/providers/github/projects/v2/project/dto.go |
Project GraphQL DTOs |
internal/infrastructure/providers/github/projects/v2/item/mapper.go |
Maps project items |
internal/infrastructure/providers/github/projects/v2/item/gateway.go |
Item GraphQL gateway |
internal/infrastructure/providers/github/projects/v2/item/field/value/mapper.go |
Maps field values |
internal/infrastructure/providers/github/projects/v2/item/field/value/mapper_test.go |
Tests value mapping |
internal/infrastructure/providers/github/projects/v2/item/field/value/gateway.go |
Field-value gateway |
internal/infrastructure/providers/github/projects/v2/item/field/value/dto.go |
Field-value DTOs |
internal/infrastructure/providers/github/projects/v2/item/dto.go |
Item GraphQL DTOs |
internal/infrastructure/providers/github/projects/v2/graphql/not_found.go |
Normalizes not-found errors |
internal/infrastructure/providers/github/projects/v2/graphql/not_found_test.go |
Tests error normalization |
internal/infrastructure/providers/github/projects/v2/graphql/date.go |
Parses GraphQL dates |
internal/infrastructure/providers/github/projects/v2/field/mapper.go |
Maps custom fields |
internal/infrastructure/providers/github/projects/v2/field/mapper_test.go |
Tests field mapping |
internal/infrastructure/providers/github/projects/v2/field/gateway.go |
Field GraphQL gateway |
internal/infrastructure/providers/github/projects/v2/field/dto.go |
Field GraphQL DTOs |
internal/application/projects/team/link/use-cases/get.go |
Gets team links |
internal/application/projects/team/link/use-cases/detach.go |
Detaches team links |
internal/application/projects/team/link/use-cases/attach.go |
Attaches team links |
internal/application/projects/team/link/use-cases/attach_test.go |
Tests team attachment |
internal/application/projects/team/link/store.go |
Team-link store contract |
internal/application/projects/team/link/result.go |
Team-link models |
internal/application/projects/repository/link/use-cases/get.go |
Gets repository links |
internal/application/projects/repository/link/use-cases/detach.go |
Detaches repository links |
internal/application/projects/repository/link/use-cases/attach.go |
Attaches repository links |
internal/application/projects/repository/link/use-cases/attach_test.go |
Tests repository attachment |
internal/application/projects/repository/link/store.go |
Repository-link store contract |
internal/application/projects/repository/link/result.go |
Repository-link models |
internal/application/projects/project/use-cases/update.go |
Updates projects |
internal/application/projects/project/use-cases/get.go |
Gets projects |
internal/application/projects/project/use-cases/delete.go |
Deletes projects |
internal/application/projects/project/use-cases/create.go |
Creates projects |
internal/application/projects/project/use-cases/create_test.go |
Tests project creation |
internal/application/projects/project/store.go |
Project store contract |
internal/application/projects/project/result.go |
Project models |
internal/application/projects/not_found.go |
Defines not-found sentinel |
internal/application/projects/item/use-cases/restore.go |
Restores items |
internal/application/projects/item/use-cases/remove.go |
Removes items |
internal/application/projects/item/use-cases/get.go |
Gets items |
internal/application/projects/item/use-cases/archive.go |
Archives items |
internal/application/projects/item/use-cases/add.go |
Adds items |
internal/application/projects/item/use-cases/add_test.go |
Tests item addition |
internal/application/projects/item/store.go |
Item store contract |
internal/application/projects/item/result.go |
Item models |
internal/application/projects/item/field/value/use-cases/set.go |
Sets field values |
internal/application/projects/item/field/value/use-cases/set_test.go |
Tests value setting |
internal/application/projects/item/field/value/use-cases/get.go |
Gets field values |
internal/application/projects/item/field/value/use-cases/clear.go |
Clears field values |
internal/application/projects/item/field/value/store.go |
Value store contract |
internal/application/projects/item/field/value/result.go |
Field-value models |
internal/application/projects/field/use-cases/update.go |
Updates fields |
internal/application/projects/field/use-cases/get.go |
Gets fields |
internal/application/projects/field/use-cases/delete.go |
Deletes fields |
internal/application/projects/field/use-cases/create.go |
Creates fields |
internal/application/projects/field/use-cases/create_test.go |
Tests field creation |
internal/application/projects/field/store.go |
Field store contract |
internal/application/projects/field/result.go |
Field models |
github/resource_github_team_project.go |
Implements team-link resource |
github/resource_github_team_project_test.go |
Tests team-link resource |
github/resource_github_project.go |
Implements project resource |
github/resource_github_project_test.go |
Tests project resource |
github/resource_github_project_repository.go |
Implements repository-link resource |
github/resource_github_project_repository_test.go |
Tests repository links |
github/resource_github_project_item.go |
Implements item resource |
github/resource_github_project_item_test.go |
Tests item resource |
github/resource_github_project_item_field_value.go |
Implements field-value resource |
github/resource_github_project_item_field_value_test.go |
Tests field values |
github/resource_github_project_field.go |
Implements field resource |
github/resource_github_project_field_test.go |
Tests field resource |
github/provider.go |
Registers new resources |
github/provider_project_v2_test.go |
Tests registration and dates |
github/project_v2_test_helpers_test.go |
Provides GraphQL test server |
github/project_v2_schema.go |
Adds schema conversion helpers |
github/project_v2_provider.go |
Accesses provider metadata |
github/project_v2_date.go |
Validates Projects V2 dates |
examples/resources/team_project/example_1.tf |
Shows team linking |
examples/resources/project/example_1.tf |
Shows project creation |
examples/resources/project_repository/example_1.tf |
Shows repository linking |
examples/resources/project_item/example_1.tf |
Shows item addition |
examples/resources/project_item_field_value/example_1.tf |
Shows value assignment |
examples/resources/project_field/example_1.tf |
Shows field creation |
docs/resources/team_project.md |
Generated team-link docs |
docs/resources/project.md |
Generated project docs |
docs/resources/project_repository.md |
Generated repository-link docs |
docs/resources/project_item.md |
Generated item docs |
docs/resources/project_item_field_value.md |
Generated field-value docs |
docs/resources/project_field.md |
Generated field docs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2918
Before the change?
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
P.S: AlmostDDDPowered ^^