Repository selection rules

GitHub

  1. Repository name — you can use the full or partial name of a repository. Wildcard characters can be used at the end of the rule to match repository names:

    1. * — matches zero or more characters

    2. ? — matches exactly one character

  2. Topic name — specify the exact name of a topic. For example, if you enter the topic html, all repositories assigned to the html topic will be backed up.


GitLab

  1. Repository name — you can use the full or partial name of a repository. Wildcard characters can be used at the end of the rule to match repository names:

    1. * — matches zero or more characters

    2. ? — matches exactly one character

  2. Topic name — specify the exact name of a topic. For example, if you enter the topic html, all repositories assigned to the html topic will be backed up.

  3. Group path — protect all repositories within the specified group or subgroup path.


Bitbucket and Azure DevOps

  1. Repository name — you can use the full or partial name of a repository. Wildcard characters can be used at the end of the rule to match repository names:

    1. * — matches zero or more characters

    2. ? — matches exactly one character

  2. Project name — protect all repositories within the specified project.


Examples

  1. Pattern: yourorganization/*

    This will match all repositories in the organization named yourorganization.

  2. Pattern: yourorganization/n?? Matches repositories where n is followed by exactly two characters.


Regex

All rules can use regular expression patterns (regex). Regular expressions allow you to define flexible and adaptable rules that align with your organization's naming conventions. This approach enables precise targeting and automation based on consistent patterns in repository or resource names. Below are a few illustrative examples of how these rules can be applied, although the possible configurations extend far beyond these examples. By leveraging regex, organizations can streamline rule creation while maintaining adaptability to evolving naming standards.

Examples:

  1. Pattern: yourorganization/repo[0-9]+ This will match repositories such as repo1, repo12, repo123, and so on.

  2. Pattern: yourorganization/.*data.*

    Matches any repository name containing the word data.

  3. Pattern: yourorganization/(?!.*data.*) Excludes any repository name that contains the word data.

Last updated