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

API documentation: https://docs.gitlab.com/api/projects/#create-a-project

Additional Details

Implementation Guide

  • Read the CONTRIBUTING.md guide 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.go called merge_trains_skip_train_allowed. Use the example of merge_trains_enabled to see where you need to add it.
  • Add or update an existing test in internal/provider/sdk/resource_gitlab_project_test.go that includes the new attribute.
  • Add a new attribute to internal/provider/datasource_gitlab_project.go called merge_trains_skip_train_allowed. Again use the example of merge_trains_enabled to see where you need to add it.
  • Add or update an existing test in internal/provider/datasource_gitlab_project_test.go to check the value is returned.
Edited by 🤖 GitLab Bot 🤖