Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AlexanderMann opened this issue Oct 30, 2017 · 0 comments
Open

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

AlexanderMann opened this issue Oct 30, 2017 · 0 comments

Comments

@AlexanderMann
Copy link

AlexanderMann commented Oct 30, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant