Swift Package Index

Gitlab

https://github.com/h2glab/gitlab-provider.git

📜 Gitlab Provider for Vapor


Compatibility

  • 0.1.0
    5.3
    5.2
    5.1
    5.0
    4.2
  • master
    5.3
    5.2
    5.1
    5.0
    4.2
  • 0.1.0
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
  • master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS

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.