diff --git a/api/tangled/gitrefUpdate.go b/api/tangled/gitrefUpdate.go new file mode 100644 index 0000000..9c7d30d --- /dev/null +++ b/api/tangled/gitrefUpdate.go @@ -0,0 +1,33 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.refUpdate + +//import ( +// "github.com/bluesky-social/indigo/lex/util" +//) + +const ( + GitRefUpdateNSID = "sh.tangled.git.refUpdate" +) + +//func init() { +// util.RegisterType("sh.tangled.git.refUpdate", &GitRefUpdate{}) +//} // +// RECORDTYPE: GitRefUpdate +type GitRefUpdate struct { + LexiconTypeID string `json:"$type,const=sh.tangled.git.refUpdate" cborgen:"$type,const=sh.tangled.git.refUpdate"` + // committerDid: did of the user that pushed this ref + CommitterDid string `json:"committerDid" cborgen:"committerDid"` + // newSha: new SHA of this ref + NewSha string `json:"newSha" cborgen:"newSha"` + // oldSha: old SHA of this ref + OldSha string `json:"oldSha" cborgen:"oldSha"` + // ref: Ref being updated + Ref string `json:"ref" cborgen:"ref"` + // repoDid: did of the owner of the repo + RepoDid string `json:"repoDid" cborgen:"repoDid"` + // repoName: name of the repo + RepoName string `json:"repoName" cborgen:"repoName"` +} diff --git a/cmd/gen.go b/cmd/gen.go index c7df284..ea8a337 100644 --- a/cmd/gen.go +++ b/cmd/gen.go @@ -15,6 +15,7 @@ func main() { "api/tangled/cbor_gen.go", "tangled", tangled.FeedStar{}, + tangled.GitRefUpdate{}, tangled.GraphFollow{}, tangled.KnotMember{}, tangled.PublicKey{}, diff --git a/lexicons/git/refUpdate.json b/lexicons/git/refUpdate.json new file mode 100644 index 0000000..c4fe0c3 --- /dev/null +++ b/lexicons/git/refUpdate.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.refUpdate", + "defs": { + "main": { + "type": "record", + "description": "An update to a git repository, emitted by knots.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "ref", + "committerDid", + "repoDid", + "repoName", + "oldSha", + "newSha" + ], + "properties": { + "ref": { + "type": "string", + "description": "Ref being updated", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "committerDid": { + "type": "string", + "description": "did of the user that pushed this ref", + "format": "did" + }, + "repoDid": { + "type": "string", + "description": "did of the owner of the repo", + "format": "did" + }, + "repoName": { + "type": "string", + "description": "name of the repo" + }, + "oldSha": { + "type": "string", + "description": "old SHA of this ref", + "minLength": 40, + "maxLength": 40 + }, + "newSha": { + "type": "string", + "description": "new SHA of this ref", + "minLength": 40, + "maxLength": 40 + } + } + } + } + } +}