From 491b583c817aaaa36e4a30b47b0648cb72dc3bff Mon Sep 17 00:00:00 2001 From: nelind Date: Sat, 7 Jun 2025 18:02:13 +0200 Subject: [PATCH] lexicons: pulls: pull rounds out into their own records Change-Id: kyupnpkvqmsysmyvumupzxlyvwvtlnrz Signed-off-by: nelind --- lexicons/pulls/pull.json | 50 -------------------- lexicons/pulls/round.json | 96 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 50 deletions(-) create mode 100644 lexicons/pulls/round.json diff --git a/lexicons/pulls/pull.json b/lexicons/pulls/pull.json index e34e060..88bdc96 100644 --- a/lexicons/pulls/pull.json +++ b/lexicons/pulls/pull.json @@ -12,7 +12,6 @@ "required": [ "target", "title", - "patch", "createdAt" ], "properties": { @@ -26,17 +25,6 @@ "body": { "type": "string" }, - "patch": { - "type": "string" - }, - "stackInfo": { - "type": "ref", - "ref": "#stackInfo" - }, - "source": { - "type": "ref", - "ref": "#source" - }, "createdAt": { "type": "string", "format": "datetime" @@ -59,44 +47,6 @@ "type": "string" } } - }, - "source": { - "type": "object", - "required": [ - "branch", - "sha" - ], - "properties": { - "branch": { - "type": "string" - }, - "sha": { - "type": "string", - "minLength": 40, - "maxLength": 40 - }, - "repo": { - "type": "string", - "format": "at-uri" - } - } - }, - "stackInfo": { - "type": "object", - "required": [ - "changeId" - ], - "properties": { - "changeId": { - "type": "string", - "description": "Change ID of this commit/change." - }, - "parent": { - "type": "string", - "description": "AT-URI of the PR for the parent commit/change in the change stack.", - "format": "at-uri" - } - } } } } diff --git a/lexicons/pulls/round.json b/lexicons/pulls/round.json new file mode 100644 index 0000000..de191a0 --- /dev/null +++ b/lexicons/pulls/round.json @@ -0,0 +1,96 @@ +{ + "lexicon": 1, + "id": "sh.tangled.repo.pull.round", + "needsCbor": true, + "needsType": true, + "defs": { + "main": { + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "pull", + "patch", + "sourceInfo", + "createdAt" + ], + "properties": { + "pull": { + "type": "string", + "format": "at-uri" + }, + "patch": { + "type": "string", + "description": "A patch describing this change. Either gotten directly from the user (patch-based PR) or from the knot based on a commit from another repo. The source of the patch and it's potential details are described by sourceInfo" + }, + "sourceInfo": { + "type": "union", + "refs": [ + "#patchSourceInfo", + "#commitSourceInfo" + ] + }, + "stackInfo": { + "type": "ref", + "ref": "#stackInfo" + }, + "comment": { + "type": "string" + }, + "prevRound": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + }, + "patchSourceInfo": { + "type": "object", + "properties": {} + }, + "commitSourceInfo": { + "type": "object", + "required": [ + "repo", + "branch", + "sha" + ], + "properties": { + "repo": { + "type": "string", + "format": "uri" + }, + "branch": { + "type": "string" + }, + "sha": { + "type": "string", + "minLength": 40, + "maxLength": 40 + } + } + }, + "stackInfo": { + "type": "object", + "required": [ + "changeId" + ], + "properties": { + "changeId": { + "type": "string", + "description": "Change ID of this commit/change." + }, + "parent": { + "type": "string", + "description": "AT-URI of the PR for the parent commit/change in the change stack.", + "format": "at-uri" + } + } + } + } +} -- 2.50.1