Skip to content

Commit

Permalink
Encode ref parameter in update-reference! from repository.clj namespa…
Browse files Browse the repository at this point in the history
…ce (#26)

Signed-off-by: Lucas Piazzi <lpiazzi26@gmail.com>
  • Loading branch information
Piazzi authored Sep 22, 2023
1 parent 3985011 commit 91035a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.6.4
- Encode ref parameter in update-reference! from repository.clj namespace

## 0.6.3
- Fix special characters on branch name

Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject dev.nubank/clj-github "0.6.3"
(defproject dev.nubank/clj-github "0.6.4"
:description "A Clojure library for interacting with the github developer API"
:url "https://github.com/nubank/clj-github"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/clj_github/repository.clj
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
Look at https://developer.github.com/v3/git/refs/#update-a-reference for details about the parameters and response format."
[client org repo ref params]
(fetch-body! client {:path (format "/repos/%s/%s/git/refs/%s" org repo ref)
(fetch-body! client {:path (format "/repos/%s/%s/git/refs/%s" org repo (codec/url-encode ref))
:headers {"Accept" "application/vnd.github.v3+json"}
:method :patch
:body params}))
Expand Down

0 comments on commit 91035a0

Please sign in to comment.