nasser / nostrand

Clojure on Mono
67 stars 11 forks source link

Cannot deps a specific branch with Gitlab #37

Closed skydread1 closed 2 years ago

skydread1 commented 2 years ago

Problem

The API seems to not consider all parameters as the branch name is ignored in the APIv4 request. It only fetches the master branch no matter the branch specified in the params.

Suggestion

Gitlab api v4 now use the param sha to fetch either a branch or a sha. In our current we use the param ref that does not work anymore on archives.

So the url should be

 (str "https://" domain "/api/v4/projects/" project-id "/repository/archive.zip?sha=" (or sha branch) "&access_token=" token)

The repo name in the archive does not have the same name according to the value provided to the sha parameter (branch or sha), so the 2 cases must be handled.