diff --git a/api/tangled/gitkeepCommit.go b/api/tangled/gitkeepCommit.go new file mode 100644 --- /dev/null +++ b/api/tangled/gitkeepCommit.go @@ -0,0 +1,39 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.keepCommit + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitKeepCommitNSID = "sh.tangled.git.keepCommit" +) + +// GitKeepCommit_Input is the input argument to a sh.tangled.git.keepCommit call. +type GitKeepCommit_Input struct { + // ref: ref to keep + Ref string `json:"ref" cborgen:"ref"` + // repo: AT-URI of the repository + Repo string `json:"repo" cborgen:"repo"` +} + +// GitKeepCommit_Output is the output of a sh.tangled.git.keepCommit call. +type GitKeepCommit_Output struct { + // commitId: Keeped commit hash + CommitId string `json:"commitId" cborgen:"commitId"` +} + +// GitKeepCommit calls the XRPC method "sh.tangled.git.keepCommit". +func GitKeepCommit(ctx context.Context, c util.LexClient, input *GitKeepCommit_Input) (*GitKeepCommit_Output, error) { + var out GitKeepCommit_Output + if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.git.keepCommit", nil, input, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/lexicons/git/keepCommit.json b/lexicons/git/keepCommit.json new file mode 100644 --- /dev/null +++ b/lexicons/git/keepCommit.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.keepCommit", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["repo", "ref"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "ref to keep" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["commitId"], + "properties": { + "commitId": { + "type": "string", + "description": "Keeped commit hash" + } + } + } + }, + "errors": [ + { + "name": "InternalServerError", + "description": "Failed to keep commit" + } + ] + } + } +}