Monorepo for Tangled tangled.org
754
fork

Configure Feed

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

knotserver/xrpc: emit refUpdate event on repo.merge xrpc call #3

open opened by boltless.me targeting master from sl/vsrmrrltymko
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mk5yepksvg22
+24
Diff #0
+24
knotserver/xrpc/merge.go
··· 8 8 9 9 "github.com/bluesky-social/indigo/atproto/syntax" 10 10 "tangled.org/core/api/tangled" 11 + "tangled.org/core/knotserver/db" 11 12 "tangled.org/core/knotserver/git" 12 13 "tangled.org/core/patchutil" 13 14 "tangled.org/core/rbac" 15 + "tangled.org/core/tid" 14 16 "tangled.org/core/types" 15 17 xrpcerr "tangled.org/core/xrpc/errors" 16 18 ) ··· 108 110 } 109 111 } 110 112 113 + go func() { 114 + refUpdate := tangled.GitRefUpdate{ 115 + RepoDid: &repoDid, 116 + OwnerDid: &data.Did, 117 + RepoName: data.Name, 118 + Ref: data.Branch, 119 + OldSha: "", // TODO: fill this 120 + NewSha: "", // TODO: fill this 121 + CommitterDid: actorDid.String(), 122 + } 123 + eventJson, err := json.Marshal(refUpdate) 124 + if err != nil { 125 + return 126 + } 127 + 128 + x.Db.InsertEvent(db.Event{ 129 + Rkey: tid.TID(), 130 + Nsid: tangled.GitRefUpdateNSID, 131 + EventJson: string(eventJson), 132 + }, x.Notifier) 133 + }() 134 + 111 135 w.WriteHeader(http.StatusOK) 112 136 }

History

1 round 0 comments
sign up or login to add to the discussion
boltless.me submitted #0
1 commit
expand
knotserver/xrpc: emit refUpdate event on repo.merge xrpc call
merge conflicts detected
expand
  • knotserver/xrpc/merge.go:8
expand 0 comments