|
func PrepareRepoContext(ctx context.Context, installationID int64, repo *github.Repository) (context.Context, zerolog.Logger) { |
go-github has a variety of repository-like objects, notably Repository and PushEventRepository. Since PrepareRepoContext only cares about a few fields accessed via getters, we should define an interface to accommodate the various repository objects.
We should use the same interface in PreparePRContext.
go-githubapp/githubapp/context.go
Line 35 in e6f4865
go-githubhas a variety of repository-like objects, notablyRepositoryandPushEventRepository. SincePrepareRepoContextonly cares about a few fields accessed via getters, we should define an interface to accommodate the various repository objects.We should use the same interface in
PreparePRContext.