From 72effbb69b6e43167aafec592259e8cfa24a713c Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Tue, 4 Aug 2026 10:10:14 +0300 Subject: [PATCH] lexicons: `repo.getPullView` Signed-off-by: Seongmin Lee --- lexicons/pulls/defs.json | 50 +++++++++++++++++++++++++++++++++ lexicons/pulls/getPullView.json | 26 +++++++++++++++++ lexicons/repo/defs.json | 2 ++ 3 files changed, 78 insertions(+) create mode 100644 lexicons/pulls/defs.json create mode 100644 lexicons/pulls/getPullView.json diff --git a/lexicons/pulls/defs.json b/lexicons/pulls/defs.json new file mode 100644 index 00000000..e95659c6 --- /dev/null +++ b/lexicons/pulls/defs.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "sh.tangled.pull.defs", + "defs": { + "pullViewDetailed": { + "type": "object", + "required": ["uri", "cid", "author", "repo", "title", "targetBranch", "versions", "createdAt"], + "properties": { + "uri": { "type": "string", "format": "at-uri" }, + "cid": { "type": "string", "format": "cid" }, + "repo": { "type": "ref", "ref": "sh.tangled.repo.defs#repoViewBasic" }, + "author": { "type": "ref", "ref": "sh.tangled.actor.defs#profileViewBasic" }, + "title": { "type": "string" }, + "body": { "type": "ref", "ref": "sh.tangled.temp.markup.markdown" }, + "targetBranch": { "type": "string" }, + "source": { + "type": "object", + "required": ["branch"], + "properties": { + "repo": { "type": "ref", "ref": "sh.tangled.repo.defs#repoViewBasic" }, + "branch": { "type": "string" } + } + }, + "versions": { + "type": "array", + "description": "TODO: this should be paginated maybe even as a separate `listPatches` method", + "item": { + "type": "ref", + "ref": "#patchView" + } + }, + "createdAt": { "type": "string", "format": "datetime" }, + "viewer": { "type": "ref", "ref": "#viewerState" } + } + }, + "patchView": { + "type": "object", + "required": ["head", "base", "createdAt"], + "properties": { + "head": { "type": "string" }, + "base": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" } + } + }, + "viewerState": { + "type": "object", + "properties": {} + } + } +} diff --git a/lexicons/pulls/getPullView.json b/lexicons/pulls/getPullView.json new file mode 100644 index 00000000..66f52c36 --- /dev/null +++ b/lexicons/pulls/getPullView.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "sh.tangled.pull.getPullView", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["uri"], + "properties": { + "pull": { + "type": "string", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "sh.tangled.pull.defs#pullViewDetailed" + } + } + } + } +} diff --git a/lexicons/repo/defs.json b/lexicons/repo/defs.json index 61494df5..4599ba1a 100644 --- a/lexicons/repo/defs.json +++ b/lexicons/repo/defs.json @@ -11,6 +11,7 @@ "slug": { "type": "string" }, "description": { "type": "string" }, "createdAt": { "type": "string", "format": "datetime" }, + "forkCount": { "type": "integer" }, "starCount": { "type": "integer" }, "viewer": { "type": "ref", "ref": "#viewerState" }, "isStarred": { "type": "boolean" } @@ -20,6 +21,7 @@ "type": "object", "description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", "properties": { + "fork": { "type": "string", "format": "at-uri" } "star": { "type": "string", "format": "at-uri" } } } -- 2.51.2