Skip to content

Commit a8f44c3

Browse files
committed
Fix note
1 parent 545ca31 commit a8f44c3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

autoload/gist.vim

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -888,11 +888,13 @@ function! s:GistGetAuthHeader() abort
888888
let v:errmsg = 'Canceled'
889889
return ''
890890
endif
891+
let note = "Gist.vim on ".hostname()
892+
let note_url "http://www.vim.org/scripts/script.php?script_id=2423"
891893
let insecureSecret = printf("basic %s", webapi#base64#b64encode(g:github_user.":".password))
892894
let res = webapi#http#post(g:gist_api_url.'authorizations', webapi#json#encode({
893895
\ "scopes" : ["gist"],
894-
\ "note" : "Gist.vim on ".hostname(),
895-
\ "note_url" : "http://www.vim.org/scripts/script.php?script_id=2423"
896+
\ "note" : note,
897+
\ "note_url" : note_url,
896898
\}), {
897899
\ "Content-Type" : "application/json",
898900
\ "Authorization" : insecureSecret,
@@ -906,8 +908,8 @@ function! s:GistGetAuthHeader() abort
906908
endif
907909
let res = webapi#http#post(g:gist_api_url.'authorizations', webapi#json#encode({
908910
\ "scopes" : ["gist"],
909-
\ "note" : "Gist.vim on ".hostname().'-'.localtime(),
910-
\ "note_url" : "http://www.vim.org/scripts/script.php?script_id=2423"
911+
\ "note" : note,
912+
\ "note_url" : note_url,
911913
\}), {
912914
\ "Content-Type" : "application/json",
913915
\ "Authorization" : insecureSecret,

0 commit comments

Comments
 (0)