Skip to content

refactor github config watching

Warren Gifford requested to merge github into master

Created by: nicksnyder

part of https://github.com/sourcegraph/sourcegraph/issues/914#issuecomment-440067022

In a followup PR, githubConf := conf.Get().Github will turn into an internal API call to fetch the config from the external services table in the database. This means this code can no longer user conf.Watch (since the code host config will no longer live in the config).

This PR preemptively refactors the code to not depend on conf.Watch. It also includes a minor improvement to not restart gitHubRepositorySyncWorker unless the relevant config actually changes.

Merge request reports

Loading