diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Ship the example tracker links commented out
An unedited copy sent every #123, Closes: and Bug: mark to bugs.example.com, a link that is wrong for every site.
Diffstat (limited to 'custom/extensions')
-rw-r--r--custom/extensions/link-commits.lua6
-rw-r--r--custom/extensions/link-trailers.lua7
2 files changed, 8 insertions, 5 deletions
diff --git a/custom/extensions/link-commits.lua b/custom/extensions/link-commits.lua
index 8dc0bc3..31d2e3a 100644
--- a/custom/extensions/link-commits.lua
+++ b/custom/extensions/link-commits.lua
@@ -31,7 +31,9 @@ local objects = {
-- URL where %s is replaced by that capture, percent-encoded. The whole match
-- is what gets shown and the capture is only what goes into the URL. Rules are
-- tried in order and the leftmost match wins, so put the more specific
--- patterns first, and an empty list leaves only object names linked.
+-- patterns first, and an empty list leaves only object names linked. The
+-- examples are commented out, so an unedited copy links object names alone,
+-- and the tracker one wants this site's own address before it goes in.
--
-- Lua patterns are not regular expressions. The reference is
-- https://www.lua.org/manual/5.1/manual.html#5.4.1
@@ -40,7 +42,7 @@ local objects = {
-- '&amp;', '&lt;' and '&gt;' rather than the bare characters, and keep a
-- pattern from ending part way through one.
local rules = {
- { pattern = "#(%d+)", url = "https://bugs.example.com/?bug=%s" },
+ -- { pattern = "#(%d+)", url = "https://bugs.example.com/?bug=%s" },
-- { pattern = "CVE%-(%d%d%d%d%-%d+)",
-- url = "https://www.cve.org/CVERecord?id=CVE-%s" },
-- { pattern = "!(%d+)",
diff --git a/custom/extensions/link-trailers.lua b/custom/extensions/link-trailers.lua
index 645c517..d5be662 100644
--- a/custom/extensions/link-trailers.lua
+++ b/custom/extensions/link-trailers.lua
@@ -30,9 +30,10 @@ local rules = {
-- current page and works for the common virtual-root layout.
{ key = "Fixes", pattern = "^(%x%x%x%x%x%x%x+)", url = "./?id=%s" },
{ key = "Reverts", pattern = "^(%x%x%x%x%x%x%x+)", url = "./?id=%s" },
- -- Closes: #123 and Bug: 123 point at the tracker.
- { key = "Closes", pattern = "^#?(%d+)$", url = "https://bugs.example.com/?bug=%s" },
- { key = "Bug", pattern = "^#?(%d+)$", url = "https://bugs.example.com/?bug=%s" },
+ -- Closes: #123 and Bug: 123 can point at the tracker once its address
+ -- stands in for the example one.
+ -- { key = "Closes", pattern = "^#?(%d+)$", url = "https://bugs.example.com/?bug=%s" },
+ -- { key = "Bug", pattern = "^#?(%d+)$", url = "https://bugs.example.com/?bug=%s" },
-- { key = "CVE", pattern = "^CVE%-(%d%d%d%d%-%d+)$",
-- url = "https://www.cve.org/CVERecord?id=CVE-%s" },
}