A collection of various string/numeric limits with GitHub. Not all of these are publicly documented, but I'd like to change that.
Note: these do not include things like GraphQL resource limits, REST rate limits and disk quotas, things that are about resource usage, rather than simple strings or numbers.
If you're wondering why the commit history is sparse, it is actively maintained, but I mainly rely on others filing issues and pull requests. If you learn something, please, by all means, reach out!
Each limit carries the full set of relevant restrictions, as well as where I gained the information from.
- Max length: 39 characters
- All characters must be either a hyphen (
-
) or alphanumeric - Cannot start with a hyphen
- Cannot include consecutive hyphens
- Cannot be a reserved name
- Must be globally unique
This was verified through checking validation messages when attempting to create an account.
- Max length: 39 characters
- All characters must be either a hyphen (
-
) or alphanumeric - Cannot start with a hyphen
- Cannot include consecutive hyphens
- Cannot be a reserved name
- Must be globally unique
This was verified through checking validation messages when attempting to create an organization.
- Max length: 255 characters
- All characters must be either a hyphen (
-
) or alphanumeric - Must be unique per-organization
Note: longer team names will still validate, they will just be truncated.
This was verified through a support email.
- Max length: 255 characters
Note: leading/trailing whitespace will still validate, they will just be trimmed on the profile page.
This was verified through checking validation messages and input when attempting to change the profile name.
- Max length: 160 characters
Note: leading/trailing whitespace will still validate, they will just be trimmed on the profile page.
This was verified through checking validation messages and input when attempting to change the profile bio.
- Max length: 255 characters
Note: leading/trailing whitespace will still validate, they will just be trimmed on the profile page.
This was verified through checking validation messages and input when attempting to change the profile URL.
- Max length: 255 characters
Note: leading/trailing whitespace will still validate, they will just be trimmed on the profile page.
This was verified through checking validation messages and input when attempting to change the profile company.
- Max length: 255 characters
Note: leading/trailing whitespace will still validate, they will just be trimmed.
This was verified through checking validation messages and input when attempting to change the profile location.
- Max length: 100 code points
- All code points must be either a hyphen (
-
), an underscore (_
), a period (.
), or an ASCII alphanumeric code point - Must be unique per-user and/or per-organization
- The repository names containing only a single period (
.
) or double period (..
) are reserved
Note: sequences of invalid code points are automatically replaced by a single hyphen (-
)
Note: length checking is performed after replacement
This was verified through checking automatically-generated aliases with repository names.
- Max value: 1073741824 (max 4-byte Ruby integer)
- Min value: 1
The first was verified through a support email. The second was verified by creating an issue in an empty repo.
- Min length: 1 character
- Max length: 256 characters
The first verified by creating an issue with a very long title and confirmed with an error message.
- Min length: 1 character
- Max length: 65536 characters
The first verified by creating an issue with a very long description and confirmed with an error message.
- Min length: 0 characters
- Max length: 262144 characters
This was verified by making PATCH requests to /repos/{owner}/{repo}/pulls/{pull_number}
with "body"
in body. This was also verified by adding longer body (262,145 characters) to a PR body in UI and confirmed with the error: There was an error posting your comment: Body is too long
.
- Maximum number of lists in starred items: 32 lists
- Maximum number of starred project per list: unknown, but over 500 starred items
- Minimum length of the description: 1 character.
- Maximum length for a list name: 32 characters.
- Minimum length of the description: 0 characters.
- Maximum length of the description: 160 characters.
First one was verified by creating 32 lists. (Confirmed here). Second one is unknown, there are lists with at least 500 items. Others can be easily checked when creating a list.
If you find limits to something not listed here, please feel free to file an issue with details about the limits. Alternatively, you could edit this file and file a pull request. I do need three things for each entry, though:
- The entry itself.
- Any relevant constraints, including max length, permitted characters, etc.
- How you figured out the relevant constraints.
Also, these are only confirmed with the public GitHub site. If there's a different set of limits for private data and/or enterprise setups, I'd love to have those.
Copyright © 2024, Claudia Meadows and others.
This work is licensed under a Creative Commons Attribution 4.0 International License.