Skip to content
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

Add initial Gitlab Project Issue resource and data source support #891

Merged

Conversation

timofurrer
Copy link
Member

This is an initial iteration of the:

  • gitlab_project_issue resource
  • gitlab_project_issue data source
  • gitlab_project_issues data source

It mainly covers the most simple CRUD functions.

Additional issue API endpoints like subscriptions, todos, time
estimation, merge request and issue relations, ... are NOT yet
supported.

I believe that the state as-is in this change set already provides a
great set of value for potentially interested users.

I imagine that the main use case for this is to bootstrap a project with
some getting started / welcome issues and not to track time etc.

Refs #746

@armsnyder this change set also incorporates some very basic approach to reduce duplication between resources and data sources as mentioned in #853. It's by no means perfect, but I think it already reduces some maintenance burden :)

@timofurrer timofurrer added this to the v3.11.0 milestone Feb 23, 2022
@timofurrer timofurrer self-assigned this Feb 23, 2022
@github-actions github-actions bot added data-source Adds or modifies a data-source documentation provider resource Adds or modifies a resource tests size/XL labels Feb 23, 2022
@timofurrer timofurrer marked this pull request as draft February 23, 2022 21:55
@timofurrer timofurrer marked this pull request as ready for review February 25, 2022 08:45
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch from e22d17e to fe61e86 Compare February 25, 2022 13:40
internal/provider/schema_gitlab_project_issue.go Outdated Show resolved Hide resolved
internal/provider/schema_gitlab_project_issue.go Outdated Show resolved Hide resolved
internal/provider/schema_gitlab_project_issue.go Outdated Show resolved Hide resolved
internal/provider/schema_gitlab_project_issue.go Outdated Show resolved Hide resolved
internal/provider/schema_gitlab_project_issue.go Outdated Show resolved Hide resolved
docs/data-sources/project_issue.md Outdated Show resolved Hide resolved
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch 5 times, most recently from a6faad1 to a08cb31 Compare February 26, 2022 09:55
@timofurrer timofurrer marked this pull request as draft February 26, 2022 10:24
@timofurrer
Copy link
Member Author

@armsnyder I've put it back to "draft", because I want to add a few more tests, however, I'm still happy if you'd review :)

Copy link
Collaborator

@armsnyder armsnyder left a comment

Choose a reason for hiding this comment

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

Nice!

docs/data-sources/project_issue.md Outdated Show resolved Hide resolved
internal/provider/data_source_gitlab_project_issues.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_project_issue.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_project_issue.go Outdated Show resolved Hide resolved
internal/provider/helper_test.go Show resolved Hide resolved
internal/provider/resource_gitlab_project_issue_test.go Outdated Show resolved Hide resolved
internal/provider/util.go Show resolved Hide resolved
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch 4 times, most recently from b376372 to 64d2fa1 Compare February 28, 2022 06:46
@timofurrer timofurrer modified the milestones: v3.11.0, v3.12.0 Feb 28, 2022
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch from 64d2fa1 to 158b64b Compare March 2, 2022 22:11
@timofurrer timofurrer marked this pull request as ready for review March 2, 2022 22:11
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch from 158b64b to ee6c5b2 Compare March 2, 2022 22:28
docs/data-sources/project_issue.md Outdated Show resolved Hide resolved
docs/data-sources/project_issue.md Show resolved Hide resolved
internal/provider/helper_test.go Show resolved Hide resolved
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch 4 times, most recently from 14f1b32 to c469e16 Compare March 6, 2022 09:55
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch from c469e16 to 50247e7 Compare March 6, 2022 09:57
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch from 50247e7 to 01068c8 Compare March 6, 2022 10:43
@timofurrer timofurrer force-pushed the feature/gitlab-project-issue-746 branch from 01068c8 to f2a3b6b Compare March 6, 2022 15:14
@timofurrer timofurrer mentioned this pull request Mar 6, 2022
3 tasks
@timofurrer timofurrer dismissed armsnyder’s stale review March 6, 2022 15:56

a lot of things have changed :D

This is an initial version of this resource.
It mainly covers the most simple CRUD functions.

Additional issue API endpoints like subscriptions, todos, time
estimation, merge request and issue relations, ... are NOT yet
supported.

I believe that the state as-is in this change set already provides a
great set of value for potentially interested users.

I imagine that the main use case for this is to bootstrap a project with
some getting started / welcome issues and not to track time etc.

Refs #746
Copy link
Collaborator

@armsnyder armsnyder left a comment

Choose a reason for hiding this comment

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

lgtm!

@timofurrer timofurrer merged commit 210ba84 into gitlabhq:main Mar 8, 2022
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

This functionality has been released in v3.12.0 of the Terraform GitLab Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue. Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
data-source Adds or modifies a data-source documentation provider resource Adds or modifies a resource size/XL tests
3 participants