Closed rubiojr closed 5 years ago
Hey, thanks for bringing this up and welcome to Swift 👋 .
It seems definitely like the labels_url
is not accepted by the URL
I looked into this and the GitHub Team is working on a new Labels API. Maybe the best would be to remove the labelsURL
from the repository property and add some new routes to Octokit.swift
and use the new labels API.
I would welcome a PullRequest, if you or someone else feels like it.
Thanks @pietbrauer, I’ll give it a try.
⚠️ Pretty new to Swift, so it's certainly possible the following doesn't make sense at all...
Sample code:
The exception:
I believe this happens because it may return something like
https://api.github.com/repos/rubiojr/test/issues/3/labels{/name}
as the value oflabels_url
(see https://developer.github.com/v3/issues/#list-issues-for-a-repository) andURL
doesn't like that? Something like:Causes:
As a workaround, I'm using a local copy of the lib changing https://github.com/nerdishbynature/octokit.swift/blob/a3b0ead0e5ebcfe5be27d3e25cf76f07c4834e24/OctoKit/Issue.swift#L16 to use a
String?
instead, which seems to be working as expected but, is there a better way?