Skip to content

Wrong name used for repository #289

@patricoferris

Description

@patricoferris

Had this repo pinned to upstream rather than the current release and I think there's a bug in the name of the repository used when getting the default ref:

"name", `String name;
] in
exec_graphql t ~variables query_default >|= fun json ->
try
let open Yojson.Safe.Util in
let data = json / "data" in
handle_rate_limit t "default_ref" (data / "rateLimit");
let repo = data / "repository" in
let def = repo / "defaultBranchRef" in
let prefix = def / "prefix" |> to_string in
let name = def / "name" |> to_string in
let hash = def / "target" / "oid" |> to_string in
let committed_date = def / "target" / "committedDate" |> to_string in
{ Commit_id.owner; repo = name ; id = `Ref (prefix ^ name); hash; committed_date }

The repo parameter is passed name but that is now the name of the default branch and not the name of the repository itself. Noticed this because when trying to fetch something it was fetching https://github.com/patricoferris/main.git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions