CorfedoCorfedoDocs

Discovery rules

Choose which repositories a source adds with discovery rules, preview them, index new ones automatically and read why a listed repository was not added.

A discovery rule chooses which repositories a source adds to the workspace. Discovery never grants access to code. Who can read a repository is set by its access.

Before you begin

  • You are a workspace administrator or have the Repository administrator role.
  • A source that shows Healthy, from Sources.

Add a rule

Open the rules

Open Settings › Sources, open the connection and select the Rules tab. Select Add rule and enter a Name.

Choose what the rule selects

SelectsUse it for
All repositories the credential can accessEverything the token or app can read
Repositories of one ownerOne organization, group or account. Public repositories the credential can read are included.
A list of repositoriesUp to 1,000 named repositories, one per line, as a name such as acme/billing or a link on the forge

For the first two, Include and Exclude narrow the selection with up to 20 patterns each, matched against the whole name. * matches any characters including /, and ? matches one character. For example, include acme/api-* and exclude *-archive. Select Preview to see the first matches before you save.

Choose how new repositories are indexed

  • Include archived repositories adds archived ones too.
  • Index new repositories automatically indexes the repositories the rule adds. Without it, each one waits for Index now on its page. Repositories already indexed stay up to date either way.

Select Add rule.

Run it

Saving a rule does not run it. Select Run now on the rule, or Run discovery on the connection for every enabled rule.

Check: the rule's Activity shows the run, and the connection's Repositories tab lists the repositories it added.

When discovery runs

Each connection runs discovery on a schedule, set under Settings › Find new repositories on the connection: Every hour, Every 6 hours, Every day or Manual only. Check for changes, on the same tab, has its own schedule and indexes new commits of the connection's repositories.

A rule that is not Enabled keeps its repositories but adds no new ones. Delete rule removes the rule with its runs. Repositories it added stay in the workspace. Narrowing a rule does not remove repositories either. The rule's Activity lists them as no longer matched. Delete them from their page if you no longer want them.

Read a list rule's results

A list rule shows each repository's outcome from the latest run. Needs review shows only the problems.

OutcomeWhyWhat to do
Added or Already presentThe repository is linkedNothing
Not foundThe forge has no repository with this nameCheck the spelling, or whether it was renamed
No accessThe credential cannot read itGive the token or app access on the forge, then run the rule again
ExcludedThe forge has it, but the rule does not take it, for example because it is archivedSelect Include archived repositories if it is archived
Check failedThe forge's answer could not be readRun the rule again later
  • Repositories covers indexing settings, statuses and removal.

On this page