Function: forge--their-id
forge--their-id is a byte-compiled function defined in forge-core.el.
Signature
(forge--their-id ARG &optional TYPE REPO)
Documentation
Return the forge's ID for ARG.
This deals with technical debt related to our handling of IDs.
Source Code
;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-core.el
(defun forge--their-id (arg &optional type repo)
"Return the forge's ID for ARG.
This deals with technical debt related to our handling of IDs."
(cond
(type
(pcase type
('assignee
(forge-sql1 [:select [forge-id]
:from assignee
:where (and (= repository $s1)
(= login $s2))]
(oref repo id) arg))
('assignees
(forge-sql-car [:select [forge-id]
:from assignee
:where (and (= repository $s1)
(in login $v2))]
(oref repo id)
(vconcat arg)))
('category
(forge-sql1 [:select [their-id]
:from discussion-category
:where (and (= repository $s1)
(= name $s2))]
(oref repo id) arg))
('label
(forge--their-id
(forge-sql1 [:select [id]
:from label
:where (and (= repository $s1)
(= name $s2))]
(oref repo id) arg)))
('labels
(mapcar (##forge--their-id % 'label repo) arg))
('milestone
(forge--their-id
(forge-sql1 [:select [id] :from milestone :where (= title $s1)] arg)))))
((stringp arg)
(car (last (split-string (base64-decode-string arg) ":"))))
((slot-exists-p arg 'their-id)
(oref arg their-id))
((slot-exists-p arg 'forge-id)
(oref arg forge-id))
((forge--their-id (oref arg id)))))