@@ -249,8 +249,8 @@ func run(ctx context.Context, cancel context.CancelFunc, cfg *config.ServerConfi
249249 // Get GitHub token from one of the installations
250250 var githubToken string
251251 for _ , org := range githubManager .AllOrgs () {
252- if client , ok := githubManager .ClientForOrg (org ); ok {
253- githubToken = client .InstallationToken (ctx )
252+ if ghClient , ok := githubManager .ClientForOrg (org ); ok {
253+ githubToken = ghClient .InstallationToken (ctx )
254254 break
255255 }
256256 }
@@ -671,8 +671,6 @@ func (cm *coordinatorManager) handleRefreshInstallations(ctx context.Context) {
671671// runBotCoordinators manages bot coordinators for all GitHub installations.
672672// It spawns one coordinator per org and refreshes the list every 5 minutes.
673673// Failed coordinators are automatically restarted every minute.
674- //
675- //nolint:interfacebloat // Interface mirrors state.Store for local type safety
676674func runBotCoordinators (
677675 ctx context.Context ,
678676 slackManager * slack.Manager ,
@@ -733,7 +731,7 @@ func runBotCoordinators(
733731
734732 // Run cleanup once on startup
735733 go func () {
736- if err := stateStore .Cleanup (); err != nil {
734+ if err := stateStore .Cleanup (context . Background () ); err != nil {
737735 slog .Warn ("initial state cleanup failed" , "error" , err )
738736 }
739737 }()
@@ -767,7 +765,7 @@ func runBotCoordinators(
767765 case <- cleanupTicker .C :
768766 // Periodic cleanup of old state data
769767 go func () {
770- if err := stateStore .Cleanup (); err != nil {
768+ if err := stateStore .Cleanup (context . Background () ); err != nil {
771769 slog .Warn ("state cleanup failed" , "error" , err )
772770 } else {
773771 slog .Debug ("state cleanup completed successfully" )
0 commit comments