Skip to content

Head branches cannot be passed into reference(s) #113

@AlexanderMann

Description

@AlexanderMann

Motivation

https://developer.github.com/v3/git/refs/

In the above link there's discussion about pulling a specific branch from GH requiring a heads prefix to be passed into the references api call. While Tentacles does have support for pulling all branches defined here, pulling a single branch requires more work via the references endpoint.

Unfortunately, if you try to use said endpoint herein, you get the following:

(tdata/reference username reponame
                     (str "head/" branch-name)
                     {:oauth-token github-access-token
                      :throw-exceptions true
                      :all_pages true})

=> CompilerException clojure.lang.ExceptionInfo: clj-http: status 404 {:status 404, :headers ..., :body "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/git/refs/#get-a-reference\"}", :request-time 203, :trace-redirects ["https://api.github.com/repos/CircleCITestOrg/circle-dummy-branch-repo/git/refs/head%2Fabranchname], :orig-content-encoding "gzip"}, compiling: ...

Note the url encoded / which comes from the heads/abranchname.

I'm not really sure what to do to provide this functionality in this repo as forward slashes are legal ref names...

Suggested Musical Pairing

https://soundcloud.com/misterwives/coloring-outside-the-lines-rac

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions