MCPcopy Create free account
hub / github.com/gogs/gogs / mirrorSyncAction

Method mirrorSyncAction

internal/database/actions.go:187–201  ·  view source on GitHub ↗
(ctx context.Context, opType ActionType, owner *User, repo *Repository, refName string, content []byte)

Source from the content-addressed store, hash-verified

185}
186
187func (s *ActionsStore) mirrorSyncAction(ctx context.Context, opType ActionType, owner *User, repo *Repository, refName string, content []byte) error {
188 return s.notifyWatchers(ctx,
189 &Action{
190 ActUserID: owner.ID,
191 ActUserName: owner.Name,
192 OpType: opType,
193 Content: string(content),
194 RepoID: repo.ID,
195 RepoUserName: owner.Name,
196 RepoName: repo.Name,
197 RefName: refName,
198 IsPrivate: repo.IsPrivate || repo.IsUnlisted,
199 },
200 )
201}
202
203type MirrorSyncPushOptions struct {
204 Owner *User

Callers 3

MirrorSyncPushMethod · 0.95
MirrorSyncCreateMethod · 0.95
MirrorSyncDeleteMethod · 0.95

Calls 2

notifyWatchersMethod · 0.95
stringFunction · 0.85

Tested by

no test coverage detected