This is a scala wrapper for the Gitlab API using the Play WS API.
Works with Gitlab 7.6.2
Play Framework
- Create a new instance and link it to your deployed Gitlab.
val gitlabAPI = new GitlabAPI(gitlabUrl, gitlabToken)
- Use it to interact with your Gitlab
// Create
gitlabAPI.createUser(email, password, userUsername, userName)
// Get
gitlabAPI.getCommit(projectId, commitSHA)
// Update
gitlabAPI.updateIssue(projectId, issueId, description = Option("solved"))
// Delete
gitlabAPI.deleteProject(projectId)
This API comes with a set of tests. In order to start the tests please follow these few steps.
- Create an application.conf file following the given application.conf.template.
- Fill the following fields in the application.conf file
Field | Description |
---|---|
gitlab.test-repository | Repository that is going to be checked out to test repository actions related behavior |
gitlab.test-ssh-key | SSH key used to clone the test depot |
gitlab.url | The url to your deployed Gitlab |
gitlab.token | The Gitlab user authentication token |
- Start the tests
$> sbt test