diff options
author | mms <michal@sapka.me> | 2024-01-19 15:22:13 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-01-19 15:22:13 +0100 |
commit | 9ab57ee255a03b86ed7303aa94959e3b104e1719 (patch) | |
tree | 926293dc6d9460f1eab12231573b71abc8d5ac4e /mms-ox-sprints.org |
feat: extract into dedicated repo
Diffstat (limited to 'mms-ox-sprints.org')
-rw-r--r-- | mms-ox-sprints.org | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/mms-ox-sprints.org b/mms-ox-sprints.org new file mode 100644 index 0000000..14923b6 --- /dev/null +++ b/mms-ox-sprints.org @@ -0,0 +1,61 @@ +#+TITLE: Michał Sapka's Emacs Config - Org - Sprints +#+AUTHOR: Michał Sapka (https://michal.sapka.me) +#+STARTUP: showall indent logdone + +#+HUGO_BASE_DIR: ~/ghq/vcs.sapka.me/michal-sapka-me/ +#+HUGO_WEIGHT: 400 +#+HUGO_SECTION: emacs/config +#+HUGO_CATEGORIES: emacs emacs-config +#+HUGO_MENU :menu "emacs-config" :name "Sprints" +#+HUGO_CUSTOM_FRONT_MATTER: :abstract "My emacs config - Sprints" +#+HUGO_CUSTOM_FRONT_MATTER: :menu-abstract "how I avoid using Jira" +#+EXPORT_FILE_NAME: sprints + +* TODO Intro + +* Jira + +We use Jira, and I hate using Jira. +Why then not just use Org instead? + +** Export + +There is a ready to use package called =ox-jira= which exports to a Jira/Conflunce compatible format +#+begin_src emacs-lisp + (use-package ox-jira + :after ox + :ensure t) +#+end_src + +But copy paste is too much hustle for me and would force me to use Jira interface. +I have written a small function which will save a correctly formatted buffer on my HDD and then pass it to =go-jira= to update the data on remote + +#+begin_src emacs-lisp + (defun mms-emacs-jira-set-delivery-status + (&optional async subtreep visible-only body-only ext-plist) + (interactive) + (setq comment-msg "Updated delivery status _with the power of Emacs_") + (setq issue (org-entry-get (point) "ISSUE")) + + (org-export-to-file 'jira (concat "~/tmp/" issue) + async subtreep visible-only body-only ext-plist) + (shell-command (concat "~/.emacs.d/helpers/jira-sync " issue " \"" comment-msg "\""))) +#+end_src + +I need add a drawer with issue id +#+begin_quote +:properties: +:ISSUE: EXPVGA-380 +:end: +#+end_quote + +Lastly, I register it as an export option + +#+begin_src emacs-lisp + (with-eval-after-load 'ox-jira + (org-export-define-derived-backend 'mms-emacs-jira 'jira + :menu-entry + '(?j "Export to JIRA" + ((?u "Update in Jira" mms-emacs-jira-set-delivery-status)))) + ) +#+end_src |