File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Tag(data::Dict) = json2github(Tag, data)
12
12
namefield (tag:: Tag ) = tag. sha
13
13
14
14
@api_default function tag (api:: GitHubAPI , repo, tag_obj; options... )
15
- result = gh_get_json (api, " /repos/$(name (repo)) /git/tags/$(name (tag_obj)) " ; options... )
15
+ result = gh_get_json (api, " /repos/$(name (repo)) /git/refs/ tags/$(name (tag_obj)) " ; options... )
16
16
return Tag (result)
17
17
end
18
18
Original file line number Diff line number Diff line change @@ -197,10 +197,15 @@ end
197
197
end
198
198
199
199
@testset " Tags and References" begin
200
+ # All tags in this repo are lightweight tags which are not covered by the API
201
+ # Maybe test in the future when we have a use case
200
202
github_jl = Repo (" JuliaWeb/GitHub.jl" )
201
203
ref = reference (github_jl, " heads/master" ; auth= auth)
202
204
@test ref. object[" type" ] == " commit"
203
205
204
- # All tags in this repo are lightweight tags which are not covered by the API
205
- # Maybe test in the future when we have a use case
206
+ # Tag API
207
+ reponame = " QuantEcon/Expectations.jl"
208
+ version = " v1.0.1"
209
+ exptag = tag (reponame, version)
210
+ @test isa (exptag, Tag)
206
211
end
You can’t perform that action at this time.
0 commit comments