this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

labeler: incorporate 'neg' flag

+11 -2
+3 -1
labeler/commit.go
··· 37 37 SourceDid: l.Src, 38 38 Cid: l.Cid, 39 39 Val: l.Val, 40 + Neg: nil, 40 41 RepoRKey: &rkey, 41 42 CreatedAt: now, 42 43 } 43 44 if negate { 44 - lr.NegatedAt = now 45 + t := true 46 + lr.Neg = &t 45 47 } 46 48 labelRows = append(labelRows, lr) 47 49 }
+2
labeler/service.go
··· 382 382 Src: s.user.Did, 383 383 Uri: "at://" + evt.RepoCommit.Repo, 384 384 Val: val, 385 + //Neg 385 386 //Cts 386 387 }) 387 388 } else { ··· 390 391 Uri: uri, 391 392 Cid: &cidStr, 392 393 Val: val, 394 + //Neg 393 395 //Cts 394 396 }) 395 397 }
+5
labeler/xrpc_handlers.go
··· 92 92 93 93 labelObjs := []*label.Label{} 94 94 for _, row := range labelRows { 95 + neg := false 96 + if row.Neg != nil && *row.Neg == true { 97 + neg = true 98 + } 95 99 labelObjs = append(labelObjs, &label.Label{ 96 100 Src: row.SourceDid, 97 101 Uri: row.Uri, 98 102 Cid: row.Cid, 99 103 Val: row.Val, 104 + Neg: neg, 100 105 Cts: row.CreatedAt.Format(util.ISO8601), 101 106 }) 102 107 }
+1 -1
models/models.go
··· 131 131 SourceDid string `gorm:"uniqueIndex:idx_uri_src_val_cid;uniqueIndex:idx_src_rkey;not null"` 132 132 Val string `gorm:"uniqueIndex:idx_uri_src_val_cid;not null"` 133 133 Cid *string `gorm:"uniqueIndex:idx_uri_src_val_cid"` 134 + Neg *bool 134 135 RepoRKey *string `gorm:"uniqueIndex:idx_src_rkey"` 135 136 CreatedAt time.Time 136 - NegatedAt time.Time 137 137 UpdatedAt time.Time 138 138 }