Skip to content

repo-updater: Allow custom git update interval

Warren Gifford requested to merge custom-update-backoff into main

Created by: ryanslade

Add a new site configuration option, gitUpdateInterval

An admin can add an array of rules with the following form:

"gitUpdateInterval": [
    {
      "pattern": "github.com",
      "interval": 10
    },
    {
      "pattern": "gitlab.com/abc",
      "interval": 15
    },
  ]
}

We'll check this list of rules from top to bottom and the first pattern to match the repo name will be chosen. If no patterns match we fall back to our current backoff heuristic.

The config was added at the site level since a repo can belong to a number of external services so if we defined it in external service config we could have conflicting rules.

Closes: https://github.com/sourcegraph/sourcegraph/issues/15926

Merge request reports

Loading