stable

Clone or download

Read-only

Enforce branch name when creating a branch on GitLab from an artifact

There is no good reason for the API on the Tuleap side to let users create branch on a GitLab with arbitrary names. It opens the possibility of abuses. If users want to create branch with arbitrary name, they should call the GitLab API directly. Also the frontend unit tests are now played by the CI pipeline. Part of story #21336: create a development branch on GitLab out of an artifact Change-Id: I69ab8a37f4c97c819750d3919c234e48df10ab59

Modified Files

Name
M plugins/gitlab/include/Artifact/Action/CreateBranchButtonFetcher.php +9 −17 Go to diff View file
A plugins/gitlab/include/Artifact/BranchNameCreatorFromArtifact.php +52 −0 Go to diff View file
M plugins/gitlab/include/REST/v1/GitlabBranchCreator.php +4 −3 Go to diff View file
M plugins/gitlab/include/REST/v1/GitlabBranchPOSTRepresentation.php +0 −7 Go to diff View file
M plugins/gitlab/include/gitlabPlugin.php +1 −0 Go to diff View file
M plugins/gitlab/package.json +2 −1 Go to diff View file
M plugins/gitlab/scripts/artifact-create-branch-action/src/api/rest-querier.test.ts +5 −5 Go to diff View file
M plugins/gitlab/scripts/artifact-create-branch-action/src/api/rest-querier.ts +0 −2 Go to diff View file
M plugins/gitlab/scripts/artifact-create-branch-action/src/components/App.vue +1 −6 Go to diff View file
M plugins/gitlab/scripts/artifact-create-branch-action/src/modal.ts +3 −9 Go to diff View file
M plugins/gitlab/tests/unit/Artifact/Action/CreateBranchButtonFetcherTest.php +5 −98 Go to diff View file
A plugins/gitlab/tests/unit/Artifact/BranchNameCreatorFromArtifactTest.php +70 −0 Go to diff View file
M plugins/gitlab/tests/unit/REST/v1/GitlabBranchCreatorTest.php +5 −4 Go to diff View file