Monorepo for Tangled
0

Configure Feed

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

lexicons: new `repo.merge*` method schema

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

Seongmin Lee (Jul 14, 2026, 1:55 AM +0900) c083a498 566279f6

+315 -1
+17
api/tangled/gitdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package tangled 4 + 5 + // schema: sh.tangled.git.defs 6 + 7 + const () 8 + 9 + // GitDefs_Signature is a "signature" in the sh.tangled.git.defs schema. 10 + type GitDefs_Signature struct { 11 + // email: Person email 12 + Email string `json:"email" cborgen:"email"` 13 + // name: Person name 14 + Name string `json:"name" cborgen:"name"` 15 + // when: Timestamp of the signature 16 + When string `json:"when" cborgen:"when"` 17 + }
+59
api/tangled/gitmergeCheck.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package tangled 4 + 5 + // schema: sh.tangled.git.mergeCheck 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + const ( 14 + GitMergeCheckNSID = "sh.tangled.git.mergeCheck" 15 + ) 16 + 17 + // GitMergeCheck_ConflictInfo is a "conflictInfo" in the sh.tangled.git.mergeCheck schema. 18 + type GitMergeCheck_ConflictInfo struct { 19 + // filename: Name of the conflicted file 20 + Filename string `json:"filename" cborgen:"filename"` 21 + // reason: Reason for the conflict 22 + Reason string `json:"reason" cborgen:"reason"` 23 + } 24 + 25 + // GitMergeCheck_Input is the input argument to a sh.tangled.git.mergeCheck call. 26 + type GitMergeCheck_Input struct { 27 + // branch: Target branch to merge into 28 + Branch string `json:"branch" cborgen:"branch"` 29 + // repo: DID of Git repository 30 + Repo string `json:"repo" cborgen:"repo"` 31 + Source *GitMergeCheck_Input_Source `json:"source" cborgen:"source"` 32 + } 33 + 34 + type GitMergeCheck_Input_Source struct { 35 + // commit: Head commit ID of PR to merge 36 + Commit string `json:"commit" cborgen:"commit"` 37 + // repo: DID of source git repository 38 + Repo string `json:"repo" cborgen:"repo"` 39 + } 40 + 41 + // GitMergeCheck_Output is the output of a sh.tangled.git.mergeCheck call. 42 + type GitMergeCheck_Output struct { 43 + // conflicts: List of files with merge conflicts 44 + Conflicts []*GitMergeCheck_ConflictInfo `json:"conflicts,omitempty" cborgen:"conflicts,omitempty"` 45 + // isConflicted: Whether the merge has conflicts 46 + IsConflicted bool `json:"isConflicted" cborgen:"isConflicted"` 47 + // message: Additional message about the merge check 48 + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 49 + } 50 + 51 + // GitMergeCheck calls the XRPC method "sh.tangled.git.mergeCheck". 52 + func GitMergeCheck(ctx context.Context, c util.LexClient, input *GitMergeCheck_Input) (*GitMergeCheck_Output, error) { 53 + var out GitMergeCheck_Output 54 + if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.git.mergeCheck", nil, input, &out); err != nil { 55 + return nil, err 56 + } 57 + 58 + return &out, nil 59 + }
+49
api/tangled/repomergePullRequest.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package tangled 4 + 5 + // schema: sh.tangled.repo.mergePullRequest 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + const ( 14 + RepoMergePullRequestNSID = "sh.tangled.repo.mergePullRequest" 15 + ) 16 + 17 + // RepoMergePullRequest_Input is the input argument to a sh.tangled.repo.mergePullRequest call. 18 + type RepoMergePullRequest_Input struct { 19 + // branch: Target branch to merge into 20 + Branch string `json:"branch" cborgen:"branch"` 21 + Commit *RepoMergePullRequest_Input_Commit `json:"commit,omitempty" cborgen:"commit,omitempty"` 22 + // repo: DID of git repository 23 + Repo string `json:"repo" cborgen:"repo"` 24 + Source *RepoMergePullRequest_Input_Source `json:"source" cborgen:"source"` 25 + Style string `json:"style" cborgen:"style"` 26 + } 27 + 28 + type RepoMergePullRequest_Input_Commit struct { 29 + // author: Merge commit author. Ignored when squash = false 30 + Author *GitDefs_Signature `json:"author,omitempty" cborgen:"author,omitempty"` 31 + // message: Merge commit message. Ignored when squash = false 32 + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 33 + } 34 + 35 + type RepoMergePullRequest_Input_Source struct { 36 + // commit: Head commit ID of PR to merge 37 + Commit string `json:"commit" cborgen:"commit"` 38 + // repo: DID of source git repository 39 + Repo string `json:"repo" cborgen:"repo"` 40 + } 41 + 42 + // RepoMergePullRequest calls the XRPC method "sh.tangled.repo.mergePullRequest". 43 + func RepoMergePullRequest(ctx context.Context, c util.LexClient, input *RepoMergePullRequest_Input) error { 44 + if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.mergePullRequest", nil, input, nil); err != nil { 45 + return err 46 + } 47 + 48 + return nil 49 + }
+25
lexicons/git/defs.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.git.defs", 4 + "defs": { 5 + "signature": { 6 + "type": "object", 7 + "required": ["name", "email", "when"], 8 + "properties": { 9 + "name": { 10 + "type": "string", 11 + "description": "Person name" 12 + }, 13 + "email": { 14 + "type": "string", 15 + "description": "Person email" 16 + }, 17 + "when": { 18 + "type": "string", 19 + "format": "datetime", 20 + "description": "Timestamp of the signature" 21 + } 22 + } 23 + } 24 + } 25 + }
+96
lexicons/git/mergeCheck.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.git.mergeCheck", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Check if a merge is possible between two branches. Performs 3-way merge check", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["repo", "branch", "source"], 13 + "properties": { 14 + "repo": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "DID of Git repository" 18 + }, 19 + "branch": { 20 + "type": "string", 21 + "description": "Target branch to merge into" 22 + }, 23 + "source": { 24 + "type": "object", 25 + "required": ["repo", "commit"], 26 + "properties": { 27 + "repo": { 28 + "type": "string", 29 + "format": "did", 30 + "description": "DID of source git repository" 31 + }, 32 + "commit": { 33 + "type": "string", 34 + "description": "Head commit ID of PR to merge" 35 + } 36 + } 37 + } 38 + } 39 + } 40 + }, 41 + "output": { 42 + "encoding": "application/json", 43 + "schema": { 44 + "type": "object", 45 + "required": ["isConflicted"], 46 + "properties": { 47 + "isConflicted": { 48 + "type": "boolean", 49 + "description": "Whether the merge has conflicts" 50 + }, 51 + "conflicts": { 52 + "type": "array", 53 + "description": "List of files with merge conflicts", 54 + "items": { 55 + "type": "ref", 56 + "ref": "#conflictInfo" 57 + } 58 + }, 59 + "message": { 60 + "type": "string", 61 + "description": "Additional message about the merge check" 62 + } 63 + } 64 + } 65 + }, 66 + "errors": [ 67 + { 68 + "name": "InvalidRequest", 69 + "description": "Invalid request parameters" 70 + }, 71 + { 72 + "name": "RepoNotFound", 73 + "description": "Repo is not registered on this knot" 74 + }, 75 + { 76 + "name": "CommitNotFound", 77 + "description": "Commit is not found from source Repo" 78 + } 79 + ] 80 + }, 81 + "conflictInfo": { 82 + "type": "object", 83 + "required": ["filename", "reason"], 84 + "properties": { 85 + "filename": { 86 + "type": "string", 87 + "description": "Name of the conflicted file" 88 + }, 89 + "reason": { 90 + "type": "string", 91 + "description": "Reason for the conflict" 92 + } 93 + } 94 + } 95 + } 96 + }
+1 -1
lexicons/repo/merge.json
··· 4 4 "defs": { 5 5 "main": { 6 6 "type": "procedure", 7 - "description": "Merge a patch into a repository branch", 7 + "description": "DEPRECATED: Merge a patch into a repository branch", 8 8 "input": { 9 9 "encoding": "application/json", 10 10 "schema": {
+68
lexicons/repo/mergePullRequest.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.mergePullRequest", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Merge a PR into a repository branch", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["repo", "branch", "source", "style"], 13 + "properties": { 14 + "repo": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "DID of git repository" 18 + }, 19 + "branch": { 20 + "type": "string", 21 + "description": "Target branch to merge into" 22 + }, 23 + "source": { 24 + "type": "object", 25 + "required": ["repo", "commit"], 26 + "properties": { 27 + "repo": { 28 + "type": "string", 29 + "format": "did", 30 + "description": "DID of source git repository" 31 + }, 32 + "commit": { 33 + "type": "string", 34 + "description": "Head commit ID of PR to merge" 35 + } 36 + } 37 + }, 38 + "style": { 39 + "type": "string", 40 + "enum": [ 41 + "rebase", 42 + "merge", 43 + "rebase-merge", 44 + "squash-rebase", 45 + "squash-rebase-merge", 46 + "fast-forward-only" 47 + ] 48 + }, 49 + "commit": { 50 + "type": "object", 51 + "properties": { 52 + "author": { 53 + "type": "ref", 54 + "ref": "sh.tangled.git.defs#signature", 55 + "description": "Merge commit author. Ignored when squash = false" 56 + }, 57 + "message": { 58 + "type": "string", 59 + "description": "Merge commit message. Ignored when squash = false" 60 + } 61 + } 62 + } 63 + } 64 + } 65 + } 66 + } 67 + } 68 + }