GitHub.jl icon indicating copy to clipboard operation
GitHub.jl copied to clipboard

GitHub.reference fails if multiple branches matches

Open KristofferC opened this issue 6 years ago • 1 comments
trafficstars

If the ref doesn't exist in the repository, but existing refs start with ref they will be returned as an array. I

julia> GitHub.reference("JuliaLang/julia", "heads/v"; handle_error=false)
ERROR: MethodError: no method matching Reference(::Array{Any,1})
Closest candidates are:
  Reference(::Any, ::Any, ::Any) at /home/kc/.julia/packages/GitHub/hKBtB/src/git/reference.jl:2
  Reference(::Union{Nothing, String}, ::Union{Nothing, HTTP.URIs.URI}, ::Union{Nothing, Dict}) at /home/kc/.julia/packages/GitHub/hKBtB/src/git/reference.jl:2
  Reference(::Dict) at /home/kc/.julia/packages/GitHub/hKBtB/src/git/reference.jl:7
Stacktrace:
 [1] #reference#219(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:handle_error,),Tuple{Bool}}}, ::typeof(reference), ::GitHub.GitHubWebAPI, ::String, ::String) at /home/kc/.julia/packages/GitHub/hKBtB/src/git/reference.jl:13
 [2] #reference at ./none:0 [inlined]
 [3] #reference#220 at ./none:0 [inlined]
 [4] (::GitHub.var"#kw##reference")(::NamedTuple{(:handle_error,),Tuple{Bool}}, ::typeof(reference), ::String, ::String) at ./none:0
 [5] top-level scope at REPL[8]:1

KristofferC avatar Oct 03 '19 09:10 KristofferC

143

Cristofer944 avatar Jul 07 '23 01:07 Cristofer944