Add emoji_events support to gitlab_project_hook resource
Description:
The gitlab_project_hook resource currently lacks support for the emoji_events trigger. While this was recently added to gitlab_group_hook, it is missing from the project-level resource.
Technical Context:
-
API Support: GitLab has supported
emoji_eventsin the REST API since version 16.0. -
SDK Support: The provider's
go.modcurrently usesgitlab.com/gitlab-org/api/client-go v1.14.0, which already includes theEmojiEventsfield in theProjectHookstruct. - Current State: The field is simply missing from the schema definition and the CRUD mapping logic in the provider.
Proposed Changes:
- Update the schema in
internal/provider/resource_gitlab_project_hook.goto include theemoji_eventsboolean attribute.
References:
- GitLab API Docs: Project Hooks API
- Related:
-
client-goIssue: gitlab-org/api/client-go#2191 (closed) -
client-gorelease: v1.12.0
-
Implementation Guide
- Follow the
CONTRIBUTING.mdguide for setting up your local development environment and clone the community fork of this project. - Add
emoji_eventsas an attribute tointernal/provider/resource_gitlab_project_hook.go. Follow thejob_eventsattribute for an idea of where to make the changes. - Run
make reviewablebefore raising a merge request with your changes.
Edited by 🤖 GitLab Bot 🤖