diff --git a/src/codecovio.jl b/src/codecovio.jl index 0cf2129..79b4b43 100644 --- a/src/codecovio.jl +++ b/src/codecovio.jl @@ -173,6 +173,15 @@ function add_ci_to_kwargs(kwargs::Dict) build = ENV["BUILDKITE_BUILD_NUMBER"], build_url = ENV["BUILDKITE_BUILD_URL"] ) + buildkite_repo = ENV["BUILDKITE_REPO"] + @info "BUILDKITE_REPO: $buildkite_repo" + # TODO: This only works for GitHub repos right now + m = match(r"^(?:https:\/\/|git@)github.com(?:\/|:)(?.*?)\.git$", buildkite_repo) + if m !== nothing + @info "BUILDKITE_REPO matched: $(m[:slug])" + # kwargs = set_defaults(kwargs, slug = String(m[:slug])) + kwargs = set_defaults(kwargs, repo = String(m[:slug])) + end if ENV["BUILDKITE_PULL_REQUEST"] != "false" kwargs = set_defaults(kwargs, pr = ENV["BUILDKITE_PULL_REQUEST"]) end @@ -248,7 +257,7 @@ function submit_generic(fcs::Vector{FileCoverage}, kwargs::Dict) uri_str = construct_uri_string(kwargs) @info "Submitting data to Codecov..." - @debug "Codecov.io API URL:\n" * mask_token(uri_str) + @info "Codecov.io API URL:\n" * mask_token(uri_str) is_black_hole_server = parse(Bool, strip(get(ENV, "JULIA_COVERAGE_IS_BLACK_HOLE_SERVER", "false")))::Bool if !dry_run @@ -304,6 +313,7 @@ function construct_uri_string(kwargs::Dict) # (:verbose is there for backwards compatibility with versions # of this code that treated it in a special way) if k != :codecov_url && k != :dry_run && k != :verbose + @info "Adding key-value pair to URL: $(k)=$(v)" uri_str = "$(uri_str)$(k)=$(v)&" end end