Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Created February 5, 2018 11:04
Show Gist options
  • Save dustinlacewell-wk/1a786e61863c78d2f28168be08d7c5df to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/1a786e61863c78d2f28168be08d7c5df to your computer and use it in GitHub Desktop.

org-ls-jira-fetch-issue

(defun org-ls-jira-fetch-issue (id)
  (setq org-ls-jira-last-issue nil)
  (-when-let (url (org-ls-jira-rest-url id))
    (org-ls-chrome-open url)
    (org-ls-chrome-wait)
    (-when-let* ((selector "document.querySelector('pre').innerHTML")
                 (text (org-ls-chrome-select selector))
                 (issue (json-read-from-string text)))
      (org-ls-chrome-close-tabs url)
      (setq org-ls-jira-last-issue issue))))
;; (org-ls-jira-fetch-issue "INFENG-4674")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment