From ecb4c10ac6cf2ee99c95415fca289e522cb0c041 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Fri, 26 Jun 2026 17:54:24 +0000 Subject: [PATCH] lexicons: `git.temp.getMergeBase` Signed-off-by: Seongmin Lee --- api/tangled/tempgetMergeBase.go | 39 +++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getMergeBase.json | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 file(s) changed, 93 insertion(s)(+), 0 deletion(s)(-) diff --git a/api/tangled/tempgetMergeBase.go b/api/tangled/tempgetMergeBase.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetMergeBase.go @@ -0,0 +1,39 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getMergeBase + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetMergeBaseNSID = "sh.tangled.git.temp.getMergeBase" +) + +// GitTempGetMergeBase_Output is the output of a sh.tangled.git.temp.getMergeBase call. +type GitTempGetMergeBase_Output struct { + Commit string `json:"commit" cborgen:"commit"` +} + +// GitTempGetMergeBase calls the XRPC method "sh.tangled.git.temp.getMergeBase". +// +// base: Ref used to find the common base. +// head: Ref to list history for. +// repo: DID of the repository +func GitTempGetMergeBase(ctx context.Context, c util.LexClient, base string, head string, repo string) (*GitTempGetMergeBase_Output, error) { + var out GitTempGetMergeBase_Output + + params := map[string]interface{}{} + params["base"] = base + params["head"] = head + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getMergeBase", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/lexicons/git/temp/getMergeBase.json b/lexicons/git/temp/getMergeBase.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getMergeBase.json @@ -0,0 +1,54 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getMergeBase", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo", "base", "head"], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repository" + }, + "base": { + "type": "string", + "description": "Ref used to find the common base." + }, + "head": { + "type": "string", + "description": "Ref to list history for." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["commit"], + "properties": { + "commit": { + "type": "string" + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} -- tangled.sh