Skip to content

Commit d67c4e4

Browse files
Use authed context when calling cs server (#8225)
1 parent 0d6893f commit d67c4e4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

enterprise/server/githubapp/githubapp.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ func (a *GitHubApp) MaybeReindexRepo(ctx context.Context, repo *tables.GitReposi
286286
if !g.CodeSearchEnabled {
287287
return nil
288288
}
289+
290+
key, err := a.env.GetAuthDB().GetAPIKeyForInternalUseOnly(ctx, repo.GroupID)
291+
if err != nil {
292+
return err
293+
}
294+
ctx = a.env.GetAuthenticator().AuthContextFromAPIKey(ctx, key.Value)
289295
_, err = codesearchService.Index(ctx, &csinpb.IndexRequest{
290296
GitRepo: &gitpb.GitRepo{
291297
RepoUrl: repoURL.String(),

0 commit comments

Comments
 (0)