Skip to content

Instantly share code, notes, and snippets.

@erickgnavar
Created August 4, 2024 20:49
Show Gist options
  • Save erickgnavar/87d30ac16ddd038887ea0e06cef24df4 to your computer and use it in GitHub Desktop.
Save erickgnavar/87d30ac16ddd038887ea0e06cef24df4 to your computer and use it in GitHub Desktop.
(let* ((status-line (buffer-substring-no-properties (line-beginning-position) (line-end-position)))
(status-code (nth 1 (split-string status-line " "))))
(unless (string-equal status-code "201")
(user-error "There was a problem with GitHub API, try again later"))
(search-forward "\n\n")
(let* ((raw-response (buffer-substring-no-properties (point) (point-max)))
(data (json-parse-string raw-response))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment