1{
2 "lexicon": 1,
3 "id": "sh.tangled.repo.getDefaultBranch",
4 "defs": {
5 "main": {
6 "type": "query",
7 "parameters": {
8 "type": "params",
9 "required": ["repo"],
10 "properties": {
11 "repo": {
12 "type": "string",
13 "description": "Repository identifier in format 'did:plc:.../repoName'"
14 }
15 }
16 },
17 "output": {
18 "encoding": "application/json",
19 "schema": {
20 "type": "object",
21 "required": ["name", "hash", "when"],
22 "properties": {
23 "name": {
24 "type": "string",
25 "description": "Default branch name"
26 },
27 "hash": {
28 "type": "string",
29 "description": "Latest commit hash on default branch"
30 },
31 "shortHash": {
32 "type": "string",
33 "description": "Short commit hash"
34 },
35 "when": {
36 "type": "string",
37 "format": "datetime",
38 "description": "Timestamp of latest commit"
39 },
40 "message": {
41 "type": "string",
42 "description": "Latest commit message"
43 },
44 "author": {
45 "type": "ref",
46 "ref": "#signature"
47 }
48 }
49 }
50 },
51 "errors": [
52 {
53 "name": "RepoNotFound",
54 "description": "Repository not found or access denied"
55 },
56 {
57 "name": "InvalidRequest",
58 "description": "Invalid request parameters"
59 }
60 ]
61 },
62 "signature": {
63 "type": "object",
64 "required": ["name", "email", "when"],
65 "properties": {
66 "name": {
67 "type": "string",
68 "description": "Author name"
69 },
70 "email": {
71 "type": "string",
72 "description": "Author email"
73 },
74 "when": {
75 "type": "string",
76 "format": "datetime",
77 "description": "Author timestamp"
78 }
79 }
80 }
81 }
82}