aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Pooley (@zuedev) <zuedev@gmail.com>2026-02-05 15:50:45 +0000
committerAlex Pooley (@zuedev) <zuedev@gmail.com>2026-02-05 15:50:45 +0000
commit4cffe6c23abb2f6580dcdcfb7ad886b34dd5d61a (patch)
tree92b19bad978c00743f3da1f92fd63d24873073d8
parent7398f77f772c86a12dc62358460f9315f7ea1fb5 (diff)
downloadgitinfo-4cffe6c23abb2f6580dcdcfb7ad886b34dd5d61a.tar
gitinfo-4cffe6c23abb2f6580dcdcfb7ad886b34dd5d61a.tar.gz
gitinfo-4cffe6c23abb2f6580dcdcfb7ad886b34dd5d61a.tar.bz2
gitinfo-4cffe6c23abb2f6580dcdcfb7ad886b34dd5d61a.tar.xz
gitinfo-4cffe6c23abb2f6580dcdcfb7ad886b34dd5d61a.zip
add homepage, funding, and version fields to schema
-rw-r--r--README.md12
-rw-r--r--gitinfo.schema.json17
2 files changed, 29 insertions, 0 deletions
diff --git a/README.md b/README.md
index cd99ef3..2cdcf0c 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,12 @@ You can reference the schema in your `.gitinfo` file using the `$schema` propert
["Bob Johnson", "bob@example.com"],
],
"license": "MIT",
+ "homepage": "https://example.com/project",
+ "funding": [
+ "https://github.com/sponsors/example",
+ "https://opencollective.com/example",
+ ],
+ "version": "1.0.0",
}
```
@@ -54,6 +60,9 @@ All keys are optional. Include only the fields relevant to your project.
- `mirrors`: A list of URLs representing mirror repositories.
- `maintainers`: A list of maintainers or contributors to the repository, provided as a 2D array with names and email addresses in the format `[[name, email], ...]`. We recommend using this field instead of traditional Git author/committer metadata for better clarity on who is responsible for the repository.
- `license`: The license under which the repository is distributed (e.g., MIT, GPL-3.0). We recommend using the short identifier from [SPDX License List](https://spdx.org/licenses/) for consistency.
+- `homepage`: The URL of the project's homepage or documentation site, if separate from the repository.
+- `funding`: A list of URLs for sponsorship or funding platforms (e.g., GitHub Sponsors, Open Collective, Patreon).
+- `version`: The version of the `.gitinfo` schema being used for this file. Can be a semver string (e.g., `1.0.0`) or a git commit hash.
### Validation Rules
@@ -67,6 +76,9 @@ All keys are optional. Include only the fields relevant to your project.
| `tags[]` | Non-empty string | `"cli"` |
| `description` | String | Any text |
| `license` | SPDX identifier | `MIT`, `GPL-3.0`, `Apache-2.0` |
+| `homepage` | Valid URI (http/https) | `https://example.com/project` |
+| `funding[]` | Valid URI (http/https) | `https://github.com/sponsors/user` |
+| `version` | Semver or commit hash | `1.0.0`, `a1b2c3d4e5f6...` |
## Usage
diff --git a/gitinfo.schema.json b/gitinfo.schema.json
index c2ab95c..fb841fc 100644
--- a/gitinfo.schema.json
+++ b/gitinfo.schema.json
@@ -68,6 +68,23 @@
"license": {
"type": "string",
"description": "The license under which the repository is distributed. Use the short identifier from SPDX License List for consistency."
+ },
+ "homepage": {
+ "type": "string",
+ "format": "uri",
+ "description": "The URL of the project's homepage or documentation site, if separate from the repository."
+ },
+ "funding": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uri"
+ },
+ "description": "A list of URLs for sponsorship or funding platforms (e.g., GitHub Sponsors, Open Collective, Patreon)."
+ },
+ "version": {
+ "type": "string",
+ "description": "The version of the .gitinfo schema being used. Can be a semver string or a git commit hash."
}
},
"additionalProperties": false