I want to use ejira in conjuntion with use-package as suggested in the readme:
(use-package ejira
:init
(setq jiralib2-url "https://jira.mycorp.com"
jiralib2-auth 'basic
jiralib2-user-login-name "my-jira-username"
jiralib2-token nil
;; NOTE, this directory needs to be in `org-agenda-files'`
ejira-org-directory "~/jira"
ejira-projects '("EJ" "JL2")
ejira-priorities-alist '(("Highest" . ?A)
("High" . ?B)
("Medium" . ?C)
("Low" . ?D)
("Lowest" . ?E))
ejira-todo-states-alist '(("To Do" . 1)
("In Progress" . 2)
("Done" . 3)))
:config
;; Tries to auto-set custom fields by looking into /editmeta
;; of an issue and an epic.
(add-hook 'jiralib2-post-login-hook #'ejira-guess-epic-sprint-fields)
;; They can also be set manually if autoconfigure is not used.
;; (setq ejira-sprint-field 'customfield_10001
;; ejira-epic-field 'customfield_10002
;; ejira-epic-summary-field 'customfield_10004)
(require 'ejira-agenda)
;; Make the issues visisble in your agenda by adding `ejira-org-directory'
;; into your `org-ag(use-package ejira
:init
(setq jiralib2-url "https://jira.mycorp.com"
jiralib2-auth 'basic
jiralib2-user-login-name "my-jira-username"
jiralib2-token nil
;; NOTE, this directory needs to be in `org-agenda-files'`
ejira-org-directory "~/jira"
ejira-projects '("EJ" "JL2")
ejira-priorities-alist '(("Highest" . ?A)
("High" . ?B)
("Medium" . ?C)
("Low" . ?D)
("Lowest" . ?E))
ejira-todo-states-alist '(("To Do" . 1)
("In Progress" . 2)
("Done" . 3)))
:config
;; Tries to auto-set custom fields by looking into /editmeta
;; of an issue and an epic.
(add-hook 'jiralib2-post-login-hook #'ejira-guess-epic-sprint-fields)
;; They can also be set manually if autoconfigure is not used.
;; (setq ejira-sprint-field 'customfield_10001
;; ejira-epic-field 'customfield_10002
;; ejira-epic-summary-field 'customfield_10004)
(require 'ejira-agenda)
;; Make the issues visisble in your agenda by adding `ejira-org-directory'
;; into your `org-agenda-files'.
(add-to-list 'org-agenda-files ejira-org-directory)
;; Add an agenda view to browse the issues that
(org-add-agenda-custom-command
'("j" "My JIRA issues"
((ejira-jql "resolution = unresolved and assignee = currentUser()"
((org-agenda-overriding-header "Assigned to me")))))))enda-files'.
(add-to-list 'org-agenda-files ejira-org-directory)
;; Add an agenda view to browse the issues that
(org-add-agenda-custom-command
'("j" "My JIRA issues"
((ejira-jql "resolution = unresolved and assignee = currentUser()"
((org-agenda-overriding-header "Assigned to me")))))))
The problem is that I want to use also auth-source and load the info from my .authinfo.gpg
machine tcct-lenovo login root port sudo password ****
machine api.github.com login anquegi^forge password ****
machine gitlab.com/api/v4 login anquegi^forge password ****
machine jira.host.com login jira-user password ***
with this:
ELISP> (auth-source-user-and-password "jira.host.com")
("jira-user" "****"
(:host "jira.host.com" :user "jira-user" :secret #f(compiled-function
()
#<bytecode -0x4dd2766433073c5>)))
ELISP> (car (auth-source-user-and-password "jira.elevenpaths.com"))
"hira-user"
ELISP> (cadr (auth-source-user-and-password "jira.elevenpaths.com"))
"****"
But I do not want to enter the password on each emacs startup to decrypt authinfo.gpg, only when I'm going to use the ejira package.