Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2

lexicons: add lastCommit to sh.tangled.repo.tree

quite easily calculated as the most recently modified file in the
present tree.

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

oppi.li 54b89d3f 27a3e035

verified
+53 -9
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.

-4
lexicons/repo/blob.json
··· 115 115 "type": "string", 116 116 "description": "Commit hash" 117 117 }, 118 - "shortHash": { 119 - "type": "string", 120 - "description": "Short commit hash" 121 - }, 122 118 "message": { 123 119 "type": "string", 124 120 "description": "Commit message"
+53 -5
lexicons/repo/tree.json
··· 6 6 "type": "query", 7 7 "parameters": { 8 8 "type": "params", 9 - "required": ["repo", "ref"], 9 + "required": [ 10 + "repo", 11 + "ref" 12 + ], 10 13 "properties": { 11 14 "repo": { 12 15 "type": "string", ··· 30 27 "encoding": "application/json", 31 28 "schema": { 32 29 "type": "object", 33 - "required": ["ref", "files"], 30 + "required": [ 31 + "ref", 32 + "files" 33 + ], 34 34 "properties": { 35 35 "ref": { 36 36 "type": "string", ··· 51 45 "type": "ref", 52 46 "ref": "#readme", 53 47 "description": "Readme for this file tree" 48 + }, 49 + "lastCommit": { 50 + "type": "ref", 51 + "ref": "#lastCommit" 54 52 }, 55 53 "files": { 56 54 "type": "array", ··· 87 77 }, 88 78 "readme": { 89 79 "type": "object", 90 - "required": ["filename", "contents"], 80 + "required": [ 81 + "filename", 82 + "contents" 83 + ], 91 84 "properties": { 92 85 "filename": { 93 86 "type": "string", ··· 104 91 }, 105 92 "treeEntry": { 106 93 "type": "object", 107 - "required": ["name", "mode", "size"], 94 + "required": [ 95 + "name", 96 + "mode", 97 + "size" 98 + ], 108 99 "properties": { 109 100 "name": { 110 101 "type": "string", ··· 130 113 }, 131 114 "lastCommit": { 132 115 "type": "object", 133 - "required": ["hash", "message", "when"], 116 + "required": [ 117 + "hash", 118 + "message", 119 + "when" 120 + ], 134 121 "properties": { 135 122 "hash": { 136 123 "type": "string", ··· 144 123 "type": "string", 145 124 "description": "Commit message" 146 125 }, 126 + "author": { 127 + "type": "ref", 128 + "ref": "#signature" 129 + }, 147 130 "when": { 148 131 "type": "string", 149 132 "format": "datetime", 150 133 "description": "Commit timestamp" 134 + } 135 + } 136 + }, 137 + "signature": { 138 + "type": "object", 139 + "required": [ 140 + "name", 141 + "email", 142 + "when" 143 + ], 144 + "properties": { 145 + "name": { 146 + "type": "string", 147 + "description": "Author name" 148 + }, 149 + "email": { 150 + "type": "string", 151 + "description": "Author email" 152 + }, 153 + "when": { 154 + "type": "string", 155 + "format": "datetime", 156 + "description": "Author timestamp" 151 157 } 152 158 } 153 159 }