summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2020-03-27 15:59:36 +0100
committerGeert Uytterhoeven <geert+renesas@glider.be>2020-04-08 12:11:22 +0200
commit734b8024506ca9b36c84ebbd8ffb226a29d5902a (patch)
tree13d4d9b90b2e374d9e20b0589770f9b9e4e0c8df
parent5b31b90e82602b2ec7906ae4868f4777ce046dfe (diff)
schema: Add support for lore email links
Add support for referring to posted patches and patch series using Message-IDs, to be looked up in lore. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-rw-r--r--projects/project.schema.yaml8
-rwxr-xr-xscripts/myhtml.py20
2 files changed, 28 insertions, 0 deletions
diff --git a/projects/project.schema.yaml b/projects/project.schema.yaml
index 70426b8..7d16de1 100644
--- a/projects/project.schema.yaml
+++ b/projects/project.schema.yaml
@@ -13,6 +13,11 @@ schema;uuid:
type: str
pattern: \b[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}\b
+schema;msgid:
+ desc: RFC2822-compliant Message-ID
+ type: str
+ pattern: .*@.*
+
###
### Our main schema
@@ -66,6 +71,9 @@ mapping:
url:
desc: Free form URL reference # URL validation is *hard*
type: str
+ lore:
+ desc: https://lore.kernel.org/r/
+ include: msgid
relationships:
desc: Relationships to other data items.
diff --git a/scripts/myhtml.py b/scripts/myhtml.py
index 0afb0e6..e633f65 100755
--- a/scripts/myhtml.py
+++ b/scripts/myhtml.py
@@ -136,6 +136,8 @@ class periject_html(base.base):
return "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id={}".format(id)
if (type == "next"):
return "https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id={}".format(id)
+ if (type == "lore"):
+ return "https://lore.kernel.org/r/{}".format(id)
return id;
#--------------------
@@ -519,6 +521,22 @@ class periject_html(base.base):
return 1
#--------------------
+ # __task_commit_posted
+ #--------------------
+ def __task_commit_posted(self, v, posted, item):
+ if (not item in posted):
+ return 0
+
+ msgid = posted[item]
+
+ with html("tr"):
+ html("th").print(item)
+ html("td").print(html("a", {"href":self.commit_url(msgid, item),
+ "target":"subbody"}).text(msgid))
+
+ return 1
+
+ #--------------------
# task_commit_upstream
#--------------------
def task_commit_upstream(self, v):
@@ -540,6 +558,8 @@ class periject_html(base.base):
cnt += self.__task_commit_upstream(v, up, "torvalds")
for up in upstream:
cnt += self.__task_commit_upstream(v, up, "next")
+ for up in upstream:
+ cnt += self.__task_commit_posted(v, up, "lore")
return (done, cnt)