Get LGTM image from lgtm.in, written by swift
Inspired by danger-lgtm.
Specifiy Dependency on your Package.swift
.
let package = Package(
name: "Dangerfile",
products: [.library(name: "MarathonDependencies", type: .dynamic, targets: ["Dangerfile"])],
dependencies: [
.package(url: "https//github.com/d-date/LGTMKit.git")
],
targets: [.target(name: "Dangerfile", dependencies: ["LGTMKit"])],
swiftLanguageVersions: [4]
)
Just written as below. Very easy 😎
import LGTMKit
LGTMKit.fetchImage() { (url) in
print(url) // LGTM image url
}
If you want a https image only, you can use httpsImageOnly
option
LGTMKit.fetchImage(httpsImageOnly: true) { (url) in
print(url) // LGTM image url
}
- Download this repo.
- Run
swift package generate-xcodeproj
. - You can develop with your Xcode.
- Commit your change.
- Make Pull Request.