Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

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

lexicons: rework lexicons to add submodule support

the blob response will additionally include submodule information if the
file is a git-submodule file.

Signed-off-by: oppiliappan <me@oppi.li>

authored by

oppiliappan and committed by
Tangled
7ed8a100 9ffd688e

+50 -14
api/tangled/repoblob.go

This is a binary file and will not be displayed.

api/tangled/repotree.go

This is a binary file and will not be displayed.

+49 -5
lexicons/repo/blob.json
··· 6 6 "type": "query", 7 7 "parameters": { 8 8 "type": "params", 9 - "required": ["repo", "ref", "path"], 9 + "required": [ 10 + "repo", 11 + "ref", 12 + "path" 13 + ], 10 14 "properties": { 11 15 "repo": { 12 16 "type": "string", ··· 35 31 "encoding": "application/json", 36 32 "schema": { 37 33 "type": "object", 38 - "required": ["ref", "path", "content"], 34 + "required": [ 35 + "ref", 36 + "path" 37 + ], 39 38 "properties": { 40 39 "ref": { 41 40 "type": "string", ··· 55 48 "encoding": { 56 49 "type": "string", 57 50 "description": "Content encoding", 58 - "enum": ["utf-8", "base64"] 51 + "enum": [ 52 + "utf-8", 53 + "base64" 54 + ] 59 55 }, 60 56 "size": { 61 57 "type": "integer", ··· 71 61 "mimeType": { 72 62 "type": "string", 73 63 "description": "MIME type of the file" 64 + }, 65 + "submodule": { 66 + "type": "ref", 67 + "ref": "#submodule", 68 + "description": "Submodule information if path is a submodule" 74 69 }, 75 70 "lastCommit": { 76 71 "type": "ref", ··· 105 90 }, 106 91 "lastCommit": { 107 92 "type": "object", 108 - "required": ["hash", "message", "when"], 93 + "required": [ 94 + "hash", 95 + "message", 96 + "when" 97 + ], 109 98 "properties": { 110 99 "hash": { 111 100 "type": "string", ··· 136 117 }, 137 118 "signature": { 138 119 "type": "object", 139 - "required": ["name", "email", "when"], 120 + "required": [ 121 + "name", 122 + "email", 123 + "when" 124 + ], 140 125 "properties": { 141 126 "name": { 142 127 "type": "string", ··· 154 131 "type": "string", 155 132 "format": "datetime", 156 133 "description": "Author timestamp" 134 + } 135 + } 136 + }, 137 + "submodule": { 138 + "type": "object", 139 + "required": [ 140 + "name", 141 + "url" 142 + ], 143 + "properties": { 144 + "name": { 145 + "type": "string", 146 + "description": "Submodule name" 147 + }, 148 + "url": { 149 + "type": "string", 150 + "description": "Submodule repository URL" 151 + }, 152 + "branch": { 153 + "type": "string", 154 + "description": "Branch to track in the submodule" 157 155 } 158 156 } 159 157 }
+1 -9
lexicons/repo/tree.json
··· 91 91 }, 92 92 "treeEntry": { 93 93 "type": "object", 94 - "required": ["name", "mode", "size", "is_file", "is_subtree"], 94 + "required": ["name", "mode", "size"], 95 95 "properties": { 96 96 "name": { 97 97 "type": "string", ··· 104 104 "size": { 105 105 "type": "integer", 106 106 "description": "File size in bytes" 107 - }, 108 - "is_file": { 109 - "type": "boolean", 110 - "description": "Whether this entry is a file" 111 - }, 112 - "is_subtree": { 113 - "type": "boolean", 114 - "description": "Whether this entry is a directory/subtree" 115 107 }, 116 108 "last_commit": { 117 109 "type": "ref",