Signed-off-by: Anirudh Oppiliappan anirudh@tangled.org
appview/notify/db/db.go
appview/notify/db/db.go
This file has not been changed.
appview/notify/logging_notifier.go
appview/notify/logging_notifier.go
This file has not been changed.
appview/notify/merged_notifier.go
appview/notify/merged_notifier.go
This file has not been changed.
appview/notify/notifier.go
appview/notify/notifier.go
This file has not been changed.
appview/notify/posthog/notifier.go
appview/notify/posthog/notifier.go
This file has not been changed.
appview/notify/webhook_notifier.go
appview/notify/webhook_notifier.go
This file has not been changed.
+2
-1
appview/state/git_http.go
+2
-1
appview/state/git_http.go
···
1
1
package state
2
2
3
3
import (
4
+
"context"
4
5
"fmt"
5
6
"io"
6
7
"net/http"
···
54
55
default:
55
56
// git-upload-pack is the default service for git-clone / git-fetch.
56
57
contentType = "application/x-git-upload-pack-advertisement"
57
-
go s.notifier.Clone(r.Context(), repo)
58
+
go s.notifier.Clone(context.Background(), repo)
58
59
}
59
60
60
61
targetURL := fmt.Sprintf("%s://%s/%s/%s/info/refs?%s", scheme, repo.Knot, user.DID, repo.Name, r.URL.RawQuery)
History
3 rounds
2 comments
anirudh.fi
submitted
#2
1 commit
expand
collapse
appview/notify: add Clone notifier, enqueue posthog event for clones
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
3/3 failed
expand
collapse
expand 0 comments
pull request successfully merged
anirudh.fi
submitted
#1
1 commit
expand
collapse
appview/notify: add Clone notifier, enqueue posthog event for clones
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
1/3 failed, 1/3 timeout, 1/3 success
expand
collapse
expand 0 comments
anirudh.fi
submitted
#0
1 commit
expand
collapse
appview/notify: add Clone notifier, enqueue posthog event for clones
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
expand 2 comments
Good catch; it might be racy, although it's very likely that the Posthog request completes before the clone does.
appview/state/git_http.go:57I think it will be fine in most cases, but shouldn't we usecontext.Background()here?otherwise lgtm!