MUST, SHOULD and other key words are used as defined in RFC 2119 and RFC 8174.
A repository name
- MUST start with a letter or number.
- MUST NOT contain any whitespace character.
- MUST use the dash
-
as the delimiter for name parts. - SHOULD only contain lowercase letters (
a-z
), numbers (0-9
)- The characters
.
, and_
are deprecated
- The characters
There is probably information to be included in the repository name itself. Additional information SHOULD follow the following schema:
<prefix>-<category>-<resource>
roundcube-plugin-foo
roundcube-plugin-bar-baz
dokuwiki-template-vector
chocolatey-extension-usewindow
(cf. note about duplications)ansible-role-http
ansible-collection-acme
- For easy filtering and grouping of repositories belonging to a certain ecosystem or language.
- Only lowerchase characters
[a-z]
and numbers[0-9]
allowed. - Optional as there might be no senseful prefix or ecosystem. This is often the case for non-programming in-house repositories like
guidelines
. - Examples:
ansible
,proxmox
,python
,roundcube
.
- An optional category, specific to a certain ecosystem.
- Only lowerchase characters
[a-z]
and numbers[0-9]
allowed. - Optional if there is no senseful category. This is often the case if there is only one kind of resource in a ecosystem.
- Examples:
plugin
,skin
,template
,role
,collection
- Mandatory, unique core part of the repository name.
- Only lowerchase characters
[a-z]
, numbers[0-9]
and additional-
as word separator allowed. - If there is an obvious name within a certain ecosystem (e.g. an upstream package ID), use it in a sanitized way:
- Replace uppercase with lowercase characters
- Replace
_
with-
- If there is no obvious ID to be used you are free to choose one following the same rules.
If a <prefix>
or <category>
is also a common part of <resource>
and this leads to duplication, drop the duplicates. So if the package is called foo-package
and belongs to the foo-
ecosystem, do NOT name the repository foo-foo-package
but foo-package
instead. The same is true if the package ID contains the type or category in some way. Name filtering is still possible this but the name does not feel odd when working with the repository on the command line.
Examples:
- If we would maintain the
ansible-lint
package, we would name the repositoryansible-lint
instead ofansible-ansible-lint
. - The
usewindow.extension
repository for Chocolatey is namedchocolatey-extension-usewindow
instead ofchocolatey-extension-usewindow-extension
.