Commit a4407446 authored by to1ne's avatar to1ne

Only mark synced issuables as TODO

And unmark others.
parent 78d780b7
......@@ -194,10 +194,17 @@ to filter."
(org-set-property "org-gitlab" (org-gitlab--singularize-class class))
(org-set-property "id" attr))
(org-edit-headline (cdr (assoc 'title issuable)))
(org-todo "TODO")
(org-gitlab--try-set-property "branch" issuable 'source_branch)
(org-set-property "iid" (org-gitlab--format-iid issuable))
(org-gitlab--try-set-property "assignee" issuable))))))
(defun org-gitlab--untodo-tree ()
"Remove TODO from all headings in tree."
(org-map-entries (lambda ()
(when (string= (nth 2 (org-heading-components)) "TODO")
(org-todo "")))))
;;;###autoload
(defun org-gitlab-sync-at-point ()
"Synchronize the heading at point.
......@@ -209,6 +216,7 @@ contain one of the following properties: `author' or `assignee'."
(interactive)
(save-excursion
(org-narrow-to-subtree)
(org-gitlab--untodo-tree)
(let ((params (org-gitlab--params-at-point))
(class (org-entry-get (point) "org-gitlab")))
(if (or (equal "issues" class) (equal "merge-requests" class))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment