diff --git a/api/tangled/cbor_gen.go b/api/tangled/cbor_gen.go --- a/api/tangled/cbor_gen.go +++ b/api/tangled/cbor_gen.go @@ -5898,13 +5898,9 @@ return err } cw := cbg.NewCborWriter(w) - fieldCount := 6 - - if t.Owner == nil { - fieldCount-- - } + fieldCount := 5 - if t.Repo == nil { + if t.ReplyTo == nil { fieldCount-- } @@ -5935,38 +5931,6 @@ if _, err := cw.WriteString(string(t.Body)); err != nil { return err } - // t.Repo (string) (string) - if t.Repo != nil { - - if len("repo") > 1000000 { - return xerrors.Errorf("Value in field \"repo\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil { - return err - } - if _, err := cw.WriteString(string("repo")); err != nil { - return err - } - - if t.Repo == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if len(*t.Repo) > 1000000 { - return xerrors.Errorf("Value in field t.Repo was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Repo))); err != nil { - return err - } - if _, err := cw.WriteString(string(*t.Repo)); err != nil { - return err - } - } - } - // t.LexiconTypeID (string) (string) if len("$type") > 1000000 { return xerrors.Errorf("Value in field \"$type\" was too long") @@ -6009,33 +5973,33 @@ if _, err := cw.WriteString(string(t.Issue)); err != nil { return err } - // t.Owner (string) (string) - if t.Owner != nil { + // t.ReplyTo (string) (string) + if t.ReplyTo != nil { - if len("owner") > 1000000 { - return xerrors.Errorf("Value in field \"owner\" was too long") + if len("replyTo") > 1000000 { + return xerrors.Errorf("Value in field \"replyTo\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("replyTo"))); err != nil { return err } - if _, err := cw.WriteString(string("owner")); err != nil { + if _, err := cw.WriteString(string("replyTo")); err != nil { return err } - if t.Owner == nil { + if t.ReplyTo == nil { if _, err := cw.Write(cbg.CborNull); err != nil { return err } } else { - if len(*t.Owner) > 1000000 { - return xerrors.Errorf("Value in field t.Owner was too long") + if len(*t.ReplyTo) > 1000000 { + return xerrors.Errorf("Value in field t.ReplyTo was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Owner))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.ReplyTo))); err != nil { return err } - if _, err := cw.WriteString(string(*t.Owner)); err != nil { + if _, err := cw.WriteString(string(*t.ReplyTo)); err != nil { return err } } @@ -6118,27 +6082,6 @@ } t.Body = string(sval) } - // t.Repo (string) (string) - case "repo": - - { - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - - sval, err := cbg.ReadStringWithMax(cr, 1000000) - if err != nil { - return err - } - - t.Repo = (*string)(&sval) - } - } // t.LexiconTypeID (string) (string) case "$type": @@ -6161,8 +6104,8 @@ } t.Issue = string(sval) } - // t.Owner (string) (string) - case "owner": + // t.ReplyTo (string) (string) + case "replyTo": { b, err := cr.ReadByte() @@ -6179,7 +6122,7 @@ if err != nil { return err } - t.Owner = (*string)(&sval) + t.ReplyTo = (*string)(&sval) } } // t.CreatedAt (string) (string) diff --git a/api/tangled/issuecomment.go b/api/tangled/issuecomment.go --- a/api/tangled/issuecomment.go +++ b/api/tangled/issuecomment.go @@ -21,6 +21,5 @@ LexiconTypeID string `json:"$type,const=sh.tangled.repo.issue.comment" cborgen:"$type,const=sh.tangled.repo.issue.comment"` Body string `json:"body" cborgen:"body"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Issue string `json:"issue" cborgen:"issue"` - Owner *string `json:"owner,omitempty" cborgen:"owner,omitempty"` - Repo *string `json:"repo,omitempty" cborgen:"repo,omitempty"` + ReplyTo *string `json:"replyTo,omitempty" cborgen:"replyTo,omitempty"` } diff --git a/lexicons/issue/comment.json b/lexicons/issue/comment.json --- a/lexicons/issue/comment.json +++ b/lexicons/issue/comment.json @@ -9,26 +9,26 @@ "type": "record", "key": "tid", "record": { "type": "object", - "required": ["issue", "body", "createdAt"], + "required": [ + "issue", + "body", + "createdAt" + ], "properties": { "issue": { "type": "string", "format": "at-uri" }, - "repo": { - "type": "string", - "format": "at-uri" - }, - "owner": { - "type": "string", - "format": "did" - }, "body": { "type": "string" }, "createdAt": { "type": "string", "format": "datetime" + }, + "replyTo": { + "type": "string", + "format": "at-uri" } } }