MCPcopy Index your code
hub / github.com/coder/coder / makeAcquiredRowWithBranch

Function makeAcquiredRowWithBranch

coderd/x/gitsync/worker_test.go:97–105  ·  view source on GitHub ↗

makeAcquiredRowWithBranch returns an AcquireStaleChatDiffStatusesRow with the given branch and a non-empty origin so the Refresher goes through the branch-resolution path.

(chatID, ownerID uuid.UUID, branch string)

Source from the content-addressed store, hash-verified

95// the given branch and a non-empty origin so the Refresher goes through the
96// branch-resolution path.
97func makeAcquiredRowWithBranch(chatID, ownerID uuid.UUID, branch string) database.AcquireStaleChatDiffStatusesRow {
98 return database.AcquireStaleChatDiffStatusesRow{
99 ChatID: chatID,
100 GitBranch: branch,
101 GitRemoteOrigin: "https://github.com/owner/repo",
102 StaleAt: time.Now().Add(-time.Minute),
103 OwnerID: ownerID,
104 }
105}
106
107// tickOnce traps the worker's NewTicker call, starts the worker,
108// fires one tick, waits for it to finish by observing the given

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected