stable
Clone or download
Read-only
This is part of story #26803 create Tuleap Git branch & pull request from artifact A Git branch can be created in a Git repository if the user is able to write in it with the REST endoint POST git/:id/branches. The expected json body content is like: { "branch_name": "string", "reference": "string" } The REST call does not return anything for now. A branch cannot be created from a tag, only from another branch or a commit. The git command update-ref[1] has been used to do the branch creation. To test, do not forget to deploy the new sudoers config file. [1] https://git-scm.com/docs/git-update-ref Change-Id: Ica42bfbfe801e53881658c9404204f1907641ceb
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/git/bin/create-new-branch.php | +39 | −0 | Go to diff View file |
A | plugins/git/etc/sudoers.d/git-create-new-branch | +3 | −0 | Go to diff View file |
A | plugins/git/include/Branch/BranchCreationExecutor.php | +47 | −0 | Go to diff View file |
A | plugins/git/include/Branch/CannotCreateNewBranchException.php | +34 | −0 | Go to diff View file |
M | plugins/git/include/Git_Exec.class.php | +10 | −0 | Go to diff View file |
A | plugins/git/include/REST/v1/Branch/BranchCreator.php | +120 | −0 | Go to diff View file |
A | plugins/git/include/REST/v1/GitBranchPOSTRepresentation.php | +48 | −0 | Go to diff View file |
M | plugins/git/include/REST/v1/RepositoryResource.class.php | +46 | −10 | Go to diff View file |
M | plugins/git/tests/rest/Git/RepositoryTest.php | +75 | −2 | Go to diff View file |
A | plugins/git/tests/rest/setup.sh | +6 | −0 | Go to diff View file |
M | plugins/git/tests/unit/Git_ExecTest.php | +11 | −0 | Go to diff View file |
A | plugins/git/tests/unit/REST/v1/Branch/BranchCreatorTest.php | +233 | −0 | Go to diff View file |
M | tests/psalm/psalm.xml | +1 | −0 | Go to diff View file |
M | tools/rpm/tuleap.rhel7.spec | +2 | −0 | Go to diff View file |