Add ability to disable skipping the merge_train
New Data Source / Resource Attribute
For gitlab projects it would be great if we could disable the ability to skip a merge train. Maybe something like merge_trains_skip_train_allowed
Related docs here: https://docs.gitlab.com/ee/ci/pipelines/merge_trains.html#allow-merge-trains-to-be-skipped-to-merge-immediately-without-restarting-merge-train-pipelines
Example issue where this behaviour is desirable https://gitlab.com/gitlab-org/cells/topology-service/-/issues/30
Related GitLab APIs
API documentation: https://docs.gitlab.com/api/projects/#create-a-project
Additional Details
- GitLab REST API resources available (read for data sources, crud for resources)
-
go-gitlabdoes support the related GitLab API already - I'd like to contribute it myself
Implementation Guide
- Read the
CONTRIBUTING.mdguide for setting up your local development environment and clone the community fork of this project. - Add a new attribute to
internal/provider/sdk/resource_gitlab_project.gocalledmerge_trains_skip_train_allowed. Use the example ofmerge_trains_enabledto see where you need to add it. - Add or update an existing test in
internal/provider/sdk/resource_gitlab_project_test.gothat includes the new attribute. - Add a new attribute to
internal/provider/datasource_gitlab_project.gocalledmerge_trains_skip_train_allowed. Again use the example ofmerge_trains_enabledto see where you need to add it. - Add or update an existing test in
internal/provider/datasource_gitlab_project_test.goto check the value is returned.
Edited by 🤖 GitLab Bot 🤖