Swiftpack.co - Package - h2glab/gitlab-provider

Vapor Gitlab Provider

Swift Vapor

Getting Started

In your Package.swift file, add the following

.package(url: "https://github.com/h2glab/gitlab-provider.git", from: "0.1.0")

Register the config and the provider to your Application

let config = GitlabConfig(serverUrl: URL(string: "https://www.gitlab.com")!, privateToken: "PRIVATE_TOKEN")

services.register(config)

try services.register(GitlabProvider())

app = try Application(services: services)

gitlabClient = try app.make(GitlabClient.self)

Service is configured.

Interacting with the API is quite easy and adopts the Future syntax used in Vapor 3. Now you can list all issues easily.

let filter = Issue.Filter.Builder().withLabels(["High"]).withPerPage(10).build()

let futureIssue = try gitlabClient.issue.list(filter: filter)

futureIssue.map { issues in (do something with issues...) }

Whats Implemented

TBD

License

Vapor Gitlab Provider is available under the MIT license. See the LICENSE file for more info.

Contributing

To contribute a feature or idea to Gitlab Provider, create an issue explaining your idea.

If you find a bug, please create an issue.

Github

link
Stars: 4
Help us keep the lights on

Dependencies

Used By

Total: 0