forge-semi.el (3739B)
1 ;;; forge-semi.el --- Support for semi-forges -*- lexical-binding: t -*- 2 3 ;; Copyright (C) 2018-2022 Jonas Bernoulli 4 5 ;; Author: Jonas Bernoulli <jonas@bernoul.li> 6 ;; Maintainer: Jonas Bernoulli <jonas@bernoul.li> 7 ;; SPDX-License-Identifier: GPL-3.0-or-later 8 9 ;; This file is not part of GNU Emacs. 10 11 ;; Forge is free software; you can redistribute it and/or modify it 12 ;; under the terms of the GNU General Public License as published by 13 ;; the Free Software Foundation; either version 3, or (at your option) 14 ;; any later version. 15 ;; 16 ;; Forge is distributed in the hope that it will be useful, but WITHOUT 17 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 18 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 19 ;; License for more details. 20 ;; 21 ;; You should have received a copy of the GNU General Public License 22 ;; along with Forge. If not, see http://www.gnu.org/licenses. 23 24 ;;; Code: 25 26 (require 'forge) 27 28 (defclass forge-gitweb-repository (forge-noapi-repository) 29 ((commit-url-format :initform "https://%h/gitweb/?p=%P.git;a=commitdiff;h=%r") 30 (branch-url-format :initform "https://%h/gitweb/?p=%P.git;a=log;h=refs/heads/%r") 31 (remote-url-format :initform "https://%h/gitweb/?p=%P.git;a=summary")) 32 "Gitweb from https://git-scm.com/docs/gitweb.") 33 34 (defclass forge-cgit-repository (forge-noapi-repository) 35 ((commit-url-format :initform "https://%h/%p.git/commit/?id=%r") 36 (branch-url-format :initform "https://%h/%p.git/log/?h=%r") 37 (remote-url-format :initform "https://%h/%p.git/about")) 38 "Cgit from https://git.zx2c4.com/cgit/about. 39 Different hosts use different url schemata, so we need multiple 40 classes. See their definitions in \"forge-semi.el\".") 41 42 (defclass forge-cgit*-repository (forge-cgit-repository) 43 ((commit-url-format :initform "https://%h/cgit/%p.git/commit/?id=%r") 44 (branch-url-format :initform "https://%h/cgit/%p.git/log/?h=%r") 45 (remote-url-format :initform "https://%h/cgit/%p.git/about")) 46 "Cgit from https://git.zx2c4.com/cgit/about. 47 Different hosts use different url schemata, so we need multiple 48 classes. See their definitions in \"forge-semi.el\".") 49 50 (defclass forge-cgit**-repository (forge-cgit-repository) 51 ((commit-url-format :initform "https://%h/cgit/%n.git/commit/?id=%r") 52 (branch-url-format :initform "https://%h/cgit/%n.git/log/?h=%r") 53 (remote-url-format :initform "https://%h/cgit/%n.git/about")) 54 "Cgit from https://git.zx2c4.com/cgit/about. 55 Different hosts use different url schemata, so we need multiple 56 classes. See their definitions in \"forge-semi.el\".") 57 58 (defclass forge-repoorcz-repository (forge-cgit-repository) 59 ((commit-url-format :initform "https://%h/%p.git/commit/%r") 60 (branch-url-format :initform "https://%h/%p.git/log/%r") 61 (remote-url-format :initform "https://%h/%p.git")) 62 "Cgit fork used on https://repo.or.cz/cgit.git. 63 Different hosts use different url schemata, so we need multiple 64 classes. See their definitions in \"forge-semi.el\".") 65 66 (defclass forge-stagit-repository (forge-noapi-repository) 67 ((commit-url-format :initform "https://%h/%n/commit/%r.html") 68 (branch-url-format :initform "https://%h/%n/refs.html") 69 (remote-url-format :initform "https://%h/%n/file/README.html")) 70 "Stagit from https://codemadness.org/git/stagit/file/README.html. 71 Only the history of \"master\" can be shown, so this links to the 72 list of refs instead of the log of the specified branch.") 73 74 (defclass forge-srht-repository (forge-noapi-repository) 75 ((commit-url-format :initform "https://%h/~%o/%n/commit/%r") 76 (branch-url-format :initform "https://%h/~%o/%n/log/%r") 77 (remote-url-format :initform "https://%h/~%o/%n")) 78 "See https://meta.sr.ht.") 79 80 ;;; _ 81 (provide 'forge-semi) 82 ;;; forge-semi.el ends here