Repository selection rules
GitHub
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:
* — matches zero or more characters
? — matches exactly one character
Topic name — specify the exact name of a topic. For example, if you enter the topic
html
, all repositories assigned to thehtml
topic will be backed up.
GitLab
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:
* — matches zero or more characters
? — matches exactly one character
Topic name — specify the exact name of a topic. For example, if you enter the topic
html
, all repositories assigned to thehtml
topic will be backed up.Group path — protect all repositories within the specified group or subgroup path.
Bitbucket and Azure DevOps
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:
* — matches zero or more characters
? — matches exactly one character
Project name — protect all repositories within the specified project.
Examples
Pattern:
yourorganization/*
This will match all repositories in the organization named
yourorganization
.Pattern:
yourorganization/n??
Matches repositories wheren
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:
Pattern:
yourorganization/repo[0-9]+
This will match repositories such asrepo1
,repo12
,repo123
, and so on.Pattern:
yourorganization/.*data.*
Matches any repository name containing the word
data
.Pattern:
yourorganization/(?!.*data.*)
Excludes any repository name that contains the worddata
.
Last updated