Skip to content

feat: Add Projects V2 resources#3541

Open
TorinAsakura wants to merge 8 commits into
integrations:mainfrom
torin-asakura:feat/projects-v2-support
Open

feat: Add Projects V2 resources#3541
TorinAsakura wants to merge 8 commits into
integrations:mainfrom
torin-asakura:feat/projects-v2-support

Conversation

@TorinAsakura

@TorinAsakura TorinAsakura commented Jul 14, 2026

Copy link
Copy Markdown

Resolves #2918


Before the change?

  • Managing Projects V2 projects, custom fields, item values, and project links requires a separate raw GraphQL layer outside the provider.

After the change?

  • Projects V2 projects, custom fields (including iteration fields), items, field values, repository links, and team links can be managed as Terraform resources.
  • The resources use the provider's existing official GitHub GraphQL client because the REST client does not expose the required Projects V2 mutations.
  • The GraphQL lifecycle is covered by mocked contract tests, and each resource includes an example and generated documentation.
  • This PR was largely generated with AI assistance, then reviewed against the live GitHub GraphQL schema and tested locally.

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

P.S: AlmostDDDPowered ^^

@github-actions

Copy link
Copy Markdown

👋 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 github-actions Bot added the Type: Feature New feature or request label Jul 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread github/resource_github_project_repository.go
Comment thread internal/infrastructure/providers/github/projects/v2/project/gateway.go Outdated
Comment thread internal/application/projects/project/use-cases/create.go Outdated
Comment thread internal/application/projects/field/use-cases/create.go Outdated
Comment thread internal/application/projects/field/use-cases/update.go Outdated
Comment thread github/resource_github_project_field.go
Comment thread github/resource_github_project_field.go
Comment thread github/resource_github_project_field.go
Comment thread github/resource_github_project_item_field_value.go
Comment thread github/resource_github_project_item_field_value.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Implement Project field resources (github_project_field)

2 participants