···5803 fieldCount--
5804 }
580500005806 if t.Source == nil {
5807 fieldCount--
5808 }
···5880 return err
5881 }
58825883- // t.Owner (string) (string)
5884- if len("owner") > 1000000 {
5885- return xerrors.Errorf("Value in field \"owner\" was too long")
5886- }
00000000058875888- if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
5889- return err
5890- }
5891- if _, err := cw.WriteString(string("owner")); err != nil {
5892- return err
5893- }
0000058945895- if len(t.Owner) > 1000000 {
5896- return xerrors.Errorf("Value in field t.Owner was too long")
5897- }
00058985899- if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
5900- return err
5901- }
5902- if _, err := cw.WriteString(string(t.Owner)); err != nil {
5903- return err
5904 }
59055906 // t.Source (string) (string)
···60986099 t.LexiconTypeID = string(sval)
6100 }
6101- // t.Owner (string) (string)
6102- case "owner":
0000000000000000000000000061036104- {
6105- sval, err := cbg.ReadStringWithMax(cr, 1000000)
6106- if err != nil {
6107- return err
000006108 }
6109-6110- t.Owner = string(sval)
6111 }
6112 // t.Source (string) (string)
6113 case "source":
···5803 fieldCount--
5804 }
58055806+ if t.Labels == nil {
5807+ fieldCount--
5808+ }
5809+5810 if t.Source == nil {
5811 fieldCount--
5812 }
···5884 return err
5885 }
58865887+ // t.Labels ([]string) (slice)
5888+ if t.Labels != nil {
5889+5890+ if len("labels") > 1000000 {
5891+ return xerrors.Errorf("Value in field \"labels\" was too long")
5892+ }
5893+5894+ if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("labels"))); err != nil {
5895+ return err
5896+ }
5897+ if _, err := cw.WriteString(string("labels")); err != nil {
5898+ return err
5899+ }
59005901+ if len(t.Labels) > 8192 {
5902+ return xerrors.Errorf("Slice value in field t.Labels was too long")
5903+ }
5904+5905+ if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Labels))); err != nil {
5906+ return err
5907+ }
5908+ for _, v := range t.Labels {
5909+ if len(v) > 1000000 {
5910+ return xerrors.Errorf("Value in field v was too long")
5911+ }
59125913+ if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
5914+ return err
5915+ }
5916+ if _, err := cw.WriteString(string(v)); err != nil {
5917+ return err
5918+ }
59195920+ }
00005921 }
59225923 // t.Source (string) (string)
···61156116 t.LexiconTypeID = string(sval)
6117 }
6118+ // t.Labels ([]string) (slice)
6119+ case "labels":
6120+6121+ maj, extra, err = cr.ReadHeader()
6122+ if err != nil {
6123+ return err
6124+ }
6125+6126+ if extra > 8192 {
6127+ return fmt.Errorf("t.Labels: array too large (%d)", extra)
6128+ }
6129+6130+ if maj != cbg.MajArray {
6131+ return fmt.Errorf("expected cbor array")
6132+ }
6133+6134+ if extra > 0 {
6135+ t.Labels = make([]string, extra)
6136+ }
6137+6138+ for i := 0; i < int(extra); i++ {
6139+ {
6140+ var maj byte
6141+ var extra uint64
6142+ var err error
6143+ _ = maj
6144+ _ = extra
6145+ _ = err
61466147+ {
6148+ sval, err := cbg.ReadStringWithMax(cr, 1000000)
6149+ if err != nil {
6150+ return err
6151+ }
6152+6153+ t.Labels[i] = string(sval)
6154+ }
6155+6156 }
006157 }
6158 // t.Source (string) (string)
6159 case "source":
+3-2
api/tangled/tangledrepo.go
···22 Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
23 // knot: knot where the repo was created
24 Knot string `json:"knot" cborgen:"knot"`
0025 // name: name of the repo
26- Name string `json:"name" cborgen:"name"`
27- Owner string `json:"owner" cborgen:"owner"`
28 // source: source of the repo
29 Source *string `json:"source,omitempty" cborgen:"source,omitempty"`
30 // spindle: CI runner to send jobs to and receive results from
···22 Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
23 // knot: knot where the repo was created
24 Knot string `json:"knot" cborgen:"knot"`
25+ // labels: List of labels that this repo subscribes to
26+ Labels []string `json:"labels,omitempty" cborgen:"labels,omitempty"`
27 // name: name of the repo
28+ Name string `json:"name" cborgen:"name"`
029 // source: source of the repo
30 Source *string `json:"source,omitempty" cborgen:"source,omitempty"`
31 // spindle: CI runner to send jobs to and receive results from