From 0cbedec10dfd0d39f88ac02c2156ad3415feeae5 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Thu, 24 Sep 2026 22:11:35 +0900 Subject: [PATCH] lexicons/org: more git endpoints Signed-off-by: Seongmin Lee --- lexicons/org/tangled/temp/git/getArchive.json | 56 ++++++++++ lexicons/org/tangled/temp/git/getBranch.json | 6 +- lexicons/org/tangled/temp/git/getRef.json | 75 +++++++++++++ lexicons/org/tangled/temp/git/getTag.json | 71 ++++++++++++ .../org/tangled/temp/git/listBranches.json | 92 ++++++++++++++++ lexicons/org/tangled/temp/git/listTags.json | 103 ++++++++++++++++++ 6 files changed, 402 insertions(+), 1 deletion(-) create mode 100644 lexicons/org/tangled/temp/git/getArchive.json create mode 100644 lexicons/org/tangled/temp/git/getRef.json create mode 100644 lexicons/org/tangled/temp/git/getTag.json create mode 100644 lexicons/org/tangled/temp/git/listBranches.json create mode 100644 lexicons/org/tangled/temp/git/listTags.json diff --git a/lexicons/org/tangled/temp/git/getArchive.json b/lexicons/org/tangled/temp/git/getArchive.json new file mode 100644 index 000000000..433a2e348 --- /dev/null +++ b/lexicons/org/tangled/temp/git/getArchive.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.git.getArchive", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo", "ref", "prefix"], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repository" + }, + "ref": { + "type": "string", + "description": "Git reference (branch, tag, or commit SHA)" + }, + "format": { + "type": "string", + "description": "Archive format", + "enum": ["tar.gz", "zip"], + "default": "tar.gz" + }, + "prefix": { + "type": "string", + "description": "Prefix for files in the archive" + } + } + }, + "output": { + "encoding": "*/*", + "description": "Binary archive data" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + }, + { + "name": "ArchiveTooLarge", + "description": "Archive exceeds the size limit" + } + ] + } + } +} diff --git a/lexicons/org/tangled/temp/git/getBranch.json b/lexicons/org/tangled/temp/git/getBranch.json index d10f2e9d3..1f45435d9 100644 --- a/lexicons/org/tangled/temp/git/getBranch.json +++ b/lexicons/org/tangled/temp/git/getBranch.json @@ -23,7 +23,7 @@ "encoding": "application/json", "schema": { "type": "object", - "required": ["name", "hash", "message", "author"], + "required": ["name", "hash", "message", "author", "totalCommits"], "properties": { "name": { "type": "string", @@ -40,6 +40,10 @@ "author": { "type": "ref", "ref": "sh.tangled.git.defs#signature" + }, + "totalCommits": { + "type": "integer", + "description": "Number of commits reachable from this branch" } } } diff --git a/lexicons/org/tangled/temp/git/getRef.json b/lexicons/org/tangled/temp/git/getRef.json new file mode 100644 index 000000000..e97a4e62f --- /dev/null +++ b/lexicons/org/tangled/temp/git/getRef.json @@ -0,0 +1,75 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.git.getRef", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "repo", + "ref" + ], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repository" + }, + "ref": { + "type": "string", + "description": "Reference name. Such as master, refs/heads/master, or v1.16.0-alpha." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name", "oid", "message", "author", "totalCommits"], + "properties": { + "name": { + "type": "string", + "description": "Full reference name. Example: refs/heads/master" + }, + "oid": { + "type": "string", + "description": "Latest commit oid on this reference." + }, + "message": { + "type": "string", + "description": "Latest commit message" + }, + "author": { + "type": "ref", + "ref": "sh.tangled.git.defs#signature" + }, + "annotation": { + "type": "ref", + "ref": "org.tangled.temp.git.listTags#annotation", + "description": "Present only for annotated tags" + }, + "totalCommits": { + "type": "integer", + "description": "Number of commits reachable from this tip" + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/org/tangled/temp/git/getTag.json b/lexicons/org/tangled/temp/git/getTag.json new file mode 100644 index 000000000..b4414dd31 --- /dev/null +++ b/lexicons/org/tangled/temp/git/getTag.json @@ -0,0 +1,71 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.git.getTag", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "repo", + "tag" + ], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repository" + }, + "tag": { + "type": "string", + "description": "Name of tag, such as v1.3.0" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name", "oid", "message", "author"], + "properties": { + "name": { + "type": "string", + "description": "Tag name" + }, + "oid": { + "type": "string", + "description": "Latest commit oid on this tag" + }, + "message": { + "type": "string", + "description": "Latest commit message" + }, + "author": { + "type": "ref", + "ref": "sh.tangled.git.defs#signature" + }, + "annotation": { + "type": "ref", + "ref": "org.tangled.temp.git.listTags#annotation", + "description": "Present only for annotated tags" + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/org/tangled/temp/git/listBranches.json b/lexicons/org/tangled/temp/git/listBranches.json new file mode 100644 index 000000000..a2c304b6a --- /dev/null +++ b/lexicons/org/tangled/temp/git/listBranches.json @@ -0,0 +1,92 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.git.listBranches", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repository" + }, + "limit": { + "type": "integer", + "description": "Maximum number of branches to return", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string", + "description": "Pagination cursor" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["branches", "total"], + "properties": { + "branches": { + "type": "array", + "items": { + "type": "ref", + "ref": "#branchInfo" + } + }, + "cursor": { "type": "string" }, + "total": { + "type": "integer", + "description": "Total number of branches in the repository" + }, + "defaultBranch": { + "type": "string", + "description": "Name of the default branch" + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + }, + "branchInfo": { + "type": "object", + "required": ["name", "oid", "message", "author", "committer"], + "properties": { + "name": { + "type": "string", + "description": "Branch name" + }, + "oid": { + "type": "string", + "description": "Latest commit oid on this branch" + }, + "message": { + "type": "string", + "description": "Latest commit message" + }, + "author": { + "type": "ref", + "ref": "sh.tangled.git.defs#signature" + }, + "committer": { + "type": "ref", + "ref": "sh.tangled.git.defs#signature" + } + } + } + } +} diff --git a/lexicons/org/tangled/temp/git/listTags.json b/lexicons/org/tangled/temp/git/listTags.json new file mode 100644 index 000000000..dcf38e9ce --- /dev/null +++ b/lexicons/org/tangled/temp/git/listTags.json @@ -0,0 +1,103 @@ +{ + "lexicon": 1, + "id": "org.tangled.temp.git.listTags", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repository" + }, + "limit": { + "type": "integer", + "description": "Maximum number of tags to return", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string", + "description": "Pagination cursor" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["tags", "total"], + "properties": { + "tags": { + "type": "array", + "items": { + "type": "ref", + "ref": "#tagInfo" + } + }, + "cursor": { "type": "string" }, + "total": { + "type": "integer", + "description": "Total number of tags in the repository" + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + }, + "tagInfo": { + "type": "object", + "required": ["name", "oid", "message", "author"], + "properties": { + "name": { + "type": "string", + "description": "Tag name" + }, + "oid": { + "type": "string", + "description": "Latest commit oid on this tag" + }, + "message": { + "type": "string", + "description": "Latest commit message" + }, + "author": { + "type": "ref", + "ref": "sh.tangled.git.defs#signature" + }, + "annotation": { + "type": "ref", + "ref": "#annotation", + "description": "Present only for annotated tags" + } + } + }, + "annotation": { + "type": "object", + "required": ["message"], + "properties": { + "tagger": { + "type": "ref", + "ref": "sh.tangled.git.defs#signature" + }, + "message": { + "type": "string", + "description": "Tag message" + } + } + } + } +} -- 2.51.2