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

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

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading