Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

lexicons: `git.keepCommit`

Signed-off-by: Seongmin Lee <git@boltless.me>

Seongmin Lee (Jul 14, 2026, 1:21 AM +0900) 462bae3e 707d3291

+181
+92
api/tangled/gitkeepCommit.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package tangled 4 + 5 + // schema: sh.tangled.git.keepCommit 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + ) 14 + 15 + const ( 16 + GitKeepCommitNSID = "sh.tangled.git.keepCommit" 17 + ) 18 + 19 + // GitKeepCommit_Commit is a "commit" in the sh.tangled.git.keepCommit schema. 20 + // 21 + // RECORDTYPE: GitKeepCommit_Commit 22 + type GitKeepCommit_Commit struct { 23 + LexiconTypeID string `json:"$type,const=sh.tangled.git.keepCommit#commit" cborgen:"$type,const=sh.tangled.git.keepCommit#commit"` 24 + Oid string `json:"oid" cborgen:"oid"` 25 + Repo string `json:"repo" cborgen:"repo"` 26 + } 27 + 28 + // GitKeepCommit_Input is the input argument to a sh.tangled.git.keepCommit call. 29 + type GitKeepCommit_Input struct { 30 + // record: at-uri of target record. rkey is required 31 + Record string `json:"record" cborgen:"record"` 32 + Repo string `json:"repo" cborgen:"repo"` 33 + Source *GitKeepCommit_Input_Source `json:"source" cborgen:"source"` 34 + } 35 + 36 + type GitKeepCommit_Input_Source struct { 37 + GitKeepCommit_Commit *GitKeepCommit_Commit 38 + GitKeepCommit_Patches *GitKeepCommit_Patches 39 + } 40 + 41 + func (t *GitKeepCommit_Input_Source) MarshalJSON() ([]byte, error) { 42 + if t.GitKeepCommit_Commit != nil { 43 + t.GitKeepCommit_Commit.LexiconTypeID = "sh.tangled.git.keepCommit#commit" 44 + return json.Marshal(t.GitKeepCommit_Commit) 45 + } 46 + if t.GitKeepCommit_Patches != nil { 47 + t.GitKeepCommit_Patches.LexiconTypeID = "sh.tangled.git.keepCommit#patches" 48 + return json.Marshal(t.GitKeepCommit_Patches) 49 + } 50 + return nil, fmt.Errorf("cannot marshal empty enum") 51 + } 52 + func (t *GitKeepCommit_Input_Source) UnmarshalJSON(b []byte) error { 53 + typ, err := util.TypeExtract(b) 54 + if err != nil { 55 + return err 56 + } 57 + 58 + switch typ { 59 + case "sh.tangled.git.keepCommit#commit": 60 + t.GitKeepCommit_Commit = new(GitKeepCommit_Commit) 61 + return json.Unmarshal(b, t.GitKeepCommit_Commit) 62 + case "sh.tangled.git.keepCommit#patches": 63 + t.GitKeepCommit_Patches = new(GitKeepCommit_Patches) 64 + return json.Unmarshal(b, t.GitKeepCommit_Patches) 65 + 66 + default: 67 + return nil 68 + } 69 + } 70 + 71 + // GitKeepCommit_Output is the output of a sh.tangled.git.keepCommit call. 72 + type GitKeepCommit_Output struct { 73 + Commit string `json:"commit" cborgen:"commit"` 74 + } 75 + 76 + // GitKeepCommit_Patches is a "patches" in the sh.tangled.git.keepCommit schema. 77 + // 78 + // RECORDTYPE: GitKeepCommit_Patches 79 + type GitKeepCommit_Patches struct { 80 + LexiconTypeID string `json:"$type,const=sh.tangled.git.keepCommit#patches" cborgen:"$type,const=sh.tangled.git.keepCommit#patches"` 81 + Patches []string `json:"patches,omitempty" cborgen:"patches,omitempty"` 82 + } 83 + 84 + // GitKeepCommit calls the XRPC method "sh.tangled.git.keepCommit". 85 + func GitKeepCommit(ctx context.Context, c util.LexClient, input *GitKeepCommit_Input) (*GitKeepCommit_Output, error) { 86 + var out GitKeepCommit_Output 87 + if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.git.keepCommit", nil, input, &out); err != nil { 88 + return nil, err 89 + } 90 + 91 + return &out, nil 92 + }
+89
lexicons/git/keepCommit.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.git.keepCommit", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Keep commit for an atproto record.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["repo", "source", "record"], 13 + "properties": { 14 + "repo": { 15 + "type": "string", 16 + "format": "did" 17 + }, 18 + "source": { 19 + "type": "union", 20 + "refs": ["#commit", "#patches"] 21 + }, 22 + "record": { 23 + "type": "string", 24 + "format": "at-uri", 25 + "description": "at-uri of target record. rkey is required" 26 + } 27 + } 28 + } 29 + }, 30 + "output": { 31 + "encoding": "application/json", 32 + "schema": { 33 + "type": "object", 34 + "required": ["commit"], 35 + "properties": { 36 + "commit": { 37 + "type": "string", 38 + "minLength": 40, 39 + "maxLength": 128 40 + } 41 + } 42 + } 43 + }, 44 + "errors": [ 45 + { 46 + "name": "InvalidRequest", 47 + "description": "Invalid request parameters" 48 + }, 49 + { 50 + "name": "RepoNotFound", 51 + "description": "Repo is not registered on this knot" 52 + }, 53 + { 54 + "name": "CommitNotFound", 55 + "description": "Commit is not found from source Repo" 56 + }, 57 + { 58 + "name": "PatchApplyFailed", 59 + "description": "Failed to apply patches" 60 + } 61 + ] 62 + }, 63 + "commit": { 64 + "type": "object", 65 + "required": ["repo", "oid"], 66 + "properties": { 67 + "repo": { 68 + "type": "string", 69 + "format": "did" 70 + }, 71 + "oid": { 72 + "type": "string", 73 + "minLength": 40, 74 + "maxLength": 128 75 + } 76 + } 77 + }, 78 + "patches": { 79 + "type": "object", 80 + "required": ["patch"], 81 + "properties": { 82 + "patches": { 83 + "type": "array", 84 + "items": { "type": "string" } 85 + } 86 + } 87 + } 88 + } 89 + }