stable

Clone or download

Read-only

[feature] Add REST POST gitlab_branch/

This is part of story #21336: create a development branch on GitLab out of an artifact To try this REST route, you have to provide a json content like: { "gitlab_integration_id": 18, "artifact_id": 2450, "branch_name": "testFROMREST", "reference": "main" } In order to create the branch on GitLab, you msut ensure the following preconditions are met: * Feature flag is enabled (feature_flag_artifact-create-gitlab-branches set to true) * Project can use the Gitlab integration * User is project member * User can see the artifact * Artifact and GitLab integration are in the same project * GitLab integration is well configured with a token * Reference exists on GitLab side Change-Id: I4beafa58c8c88cf46e0d25821c94e32752a8e6e2

Modified Files

Name
M plugins/gitlab/include/API/ClientWrapper.php +1 −1 Go to diff View file
M plugins/gitlab/include/REST/ResourcesInjector.php +6 −0 Go to diff View file
A plugins/gitlab/include/REST/v1/GitlabBranchCreator.php +122 −0 Go to diff View file
A plugins/gitlab/include/REST/v1/GitlabBranchPOSTRepresentation.php +64 −0 Go to diff View file
A plugins/gitlab/include/REST/v1/GitlabBranchResource.php +130 −0 Go to diff View file
A plugins/gitlab/tests/unit/REST/v1/GitlabBranchCreatorTest.php +487 −0 Go to diff View file