From 734b8024506ca9b36c84ebbd8ffb226a29d5902a Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 27 Mar 2020 15:59:36 +0100 Subject: 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 Acked-by: Kuninori Morimoto --- projects/project.schema.yaml | 8 ++++++++ scripts/myhtml.py | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) 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; #-------------------- @@ -518,6 +520,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 #-------------------- @@ -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) -- cgit v1.2.3