Skip to content

Commit

Permalink
forge--topic-template-files: Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Feb 4, 2024
1 parent 4311976 commit 1c72a12
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lisp/forge-github.el
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@
(closql-delete post)
(forge-refresh-buffer))

(cl-defmethod forge--topic-templates ((repo forge-github-repository)
(_ (subclass forge-issue)))
(cl-defmethod forge--topic-template-files ((repo forge-github-repository)
(_ (subclass forge-issue)))
(and-let* ((files (magit-revision-files (oref repo default-branch))))
(let ((case-fold-search t))
(if-let ((file (--first (string-match-p "\
Expand All @@ -719,8 +719,8 @@
(list conf))
files)))))

(cl-defmethod forge--topic-templates ((repo forge-github-repository)
(_ (subclass forge-pullreq)))
(cl-defmethod forge--topic-template-files ((repo forge-github-repository)
(_ (subclass forge-pullreq)))
(and-let* ((files (magit-revision-files (oref repo default-branch))))
(let ((case-fold-search t))
(if-let ((file (--first (string-match-p "\
Expand Down
8 changes: 4 additions & 4 deletions lisp/forge-gitlab.el
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,13 @@
(closql-delete post)
(forge-refresh-buffer))

(cl-defmethod forge--topic-templates ((repo forge-gitlab-repository)
(_ (subclass forge-issue)))
(cl-defmethod forge--topic-template-files ((repo forge-gitlab-repository)
(_ (subclass forge-issue)))
(--filter (string-match-p "\\`\\.gitlab/issue_templates/.+\\.md\\'" it)
(magit-revision-files (oref repo default-branch))))

(cl-defmethod forge--topic-templates ((repo forge-gitlab-repository)
(_ (subclass forge-pullreq)))
(cl-defmethod forge--topic-template-files ((repo forge-gitlab-repository)
(_ (subclass forge-pullreq)))
(--filter (string-match-p "\\`\\.gitlab/merge_request_templates/.+\\.md\\'" it)
(magit-revision-files (oref repo default-branch))))

Expand Down
4 changes: 2 additions & 2 deletions lisp/forge-topic.el
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ Return a value between 0 and 1."
:object-type 'alist
:sequence-type 'list)))

(cl-defgeneric forge--topic-templates (repo class)
(cl-defgeneric forge--topic-template-files (repo class)
"Return a list of topic template files for REPO and a topic of CLASS.")

(cl-defgeneric forge--topic-template (repo class)
Expand All @@ -1451,7 +1451,7 @@ alist, containing just `text' and `position'.")
(if (equal (file-name-nondirectory f) "config.yml")
(forge--topic-parse-link-buffer)
(list (forge--topic-parse-buffer f)))))
(forge--topic-templates repo class))))
(forge--topic-template-files repo class))))

(cl-defmethod forge--topic-template ((repo forge-repository)
(class (subclass forge-topic)))
Expand Down

0 comments on commit 1c72a12

Please sign in to comment.