aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-gitlab.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-gitlab.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-gitlab.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-gitlab.el b/emacs/.emacs.d/lisp/my/my-gitlab.el
index a25533f..6dd484c 100644
--- a/emacs/.emacs.d/lisp/my/my-gitlab.el
+++ b/emacs/.emacs.d/lisp/my/my-gitlab.el
@@ -30,9 +30,10 @@
(defun my-get-gitlab-project-id (url)
(with-current-buffer (url-retrieve-synchronously
(replace-regexp-in-string "\\.git$" "" url))
- (goto-char (point-min))
- (when (re-search-forward "Project ID: \\([0-9]+\\)" nil t)
- (match-string 1))))
+ (let ((dom (libxml-parse-html-region (point-min) (point-max))))
+ (dom-attr (car
+ (dom-search dom (lambda (n) (dom-attr n 'data-project-id))))
+ 'data-project-id))))
(defun my-grok-gitlab (url)
(when-let* ((urlobj (url-generic-parse-url url))