Function: forge--fetch-issues

forge--fetch-issues is a byte-compiled function defined in forge-gitlab.el.

Signature

(forge--fetch-issues ARG &rest ARGS)

Implementations

(forge--fetch-issues (REPO forge-gitlab-repository) CALLBACK SINCE) in `forge-gitlab.el'.

Undocumented

Source Code

;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-gitlab.el
  (forge--pull repo callback)) ; TODO Pull only the one topic.

;;;; Issues

(cl-defmethod forge--fetch-issues ((repo forge-gitlab-repository) callback since)
  (letrec
      (( cb (let (val cur cnt pos)
              (lambda (&optional v)
                (cond
                  ((and (not pos) v)
                   (setq val v)
                   (setq cur v)
                   (setq pos 1)
                   (setq cnt (length val))
                   (forge--msg nil nil nil "Pulling issue %s/%s" pos cnt)
                   (forge--fetch-issue-posts repo cur cb))
                  ((setq cur (cdr cur))
                   (cl-incf pos)
                   (forge--msg nil nil nil "Pulling issue %s/%s" pos cnt)
                   (forge--fetch-issue-posts repo cur cb))
                  (t
                   (forge--msg repo t t "Pulling REPO issues")
                   (funcall callback val)))))))
    (forge--msg repo t nil "Pulling REPO issues")
    (forge--glab-get repo "/projects/:project/issues"
      `((per_page . 100)
        (order_by . "updated_at")
        ,@(and$ (or since (oref repo issues-until))
                `((updated_after . ,$))))
      :unpaginate t
      :callback cb)))