我想知道如何从用户设置中获取标签。我知道如何将选定的标签发布到用户的存储库。
let authToken = GithubAPIManager.sharedInstance.OAuthToken
let repo = newIssue.repo!.name!
let repoOwner = newIssue.repo!.ownerLogin!
let URL = Foundation.URL(string: "https://api.github.com/repos/\(repoOwner)/\(repo)/labels")!
print("Issue URL ---->", URL)
Alamofire.request(URL, method: .get, parameters: getParameters, encoding: JSONEncoding.default).responseJSON {
(response) in
guard let object = response.result.value else {
print(response.result.error!)
completionHandler(.failed)
return
}
completionHandler(.success)
print(object)
}