From 30f2e0aca660e3742161ee7a16d72bb38eb35180 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Thu, 5 Feb 2026 15:55:59 +0000 Subject: add example configurations for .gitinfo file --- README.md | 6 ++++++ examples/minimal.gitinfo | 4 ++++ examples/mirror-only.gitinfo | 10 ++++++++++ examples/open-source-project.gitinfo | 24 ++++++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 examples/minimal.gitinfo create mode 100644 examples/mirror-only.gitinfo create mode 100644 examples/open-source-project.gitinfo diff --git a/README.md b/README.md index 704c24c..827ec39 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,12 @@ You can reference the schema in your `.gitinfo` file using the `$schema` propert } ``` +See the [`examples/`](examples/) folder for more sample configurations: + +- [`minimal.gitinfo`](examples/minimal.gitinfo) — Bare minimum with just a root URL +- [`open-source-project.gitinfo`](examples/open-source-project.gitinfo) — Full-featured project with mirrors, maintainers, and funding +- [`mirror-only.gitinfo`](examples/mirror-only.gitinfo) — Read-only mirror pointing to upstream + ### Supported Keys All keys are optional. Include only the fields relevant to your project. diff --git a/examples/minimal.gitinfo b/examples/minimal.gitinfo new file mode 100644 index 0000000..18f5d07 --- /dev/null +++ b/examples/minimal.gitinfo @@ -0,0 +1,4 @@ +{ + "$schema": "https://forgejo.zue.dev/zuedev/gitinfo/raw/branch/main/gitinfo.schema.json", + "root": "https://github.com/user/project" +} diff --git a/examples/mirror-only.gitinfo b/examples/mirror-only.gitinfo new file mode 100644 index 0000000..ac24890 --- /dev/null +++ b/examples/mirror-only.gitinfo @@ -0,0 +1,10 @@ +{ + "$schema": "https://forgejo.zue.dev/zuedev/gitinfo/raw/branch/main/gitinfo.schema.json", + // This is a read-only mirror. Contributions should go to the root repository. + "root": "https://github.com/upstream/project", + "description": "Mirror of upstream/project - do not submit PRs here", + "mirrors": [ + "https://gitlab.com/mirror/project", + "https://codeberg.org/mirror/project" + ] +} diff --git a/examples/open-source-project.gitinfo b/examples/open-source-project.gitinfo new file mode 100644 index 0000000..32cae94 --- /dev/null +++ b/examples/open-source-project.gitinfo @@ -0,0 +1,24 @@ +{ + "$schema": "https://forgejo.zue.dev/zuedev/gitinfo/raw/branch/main/gitinfo.schema.json", + "root": "https://github.com/example/awesome-project", + "description": "A full-featured open source project with multiple mirrors and maintainers", + "license": "MIT", + "homepage": "https://awesome-project.dev", + "icon": "https://awesome-project.dev/logo.png", + "tags": ["cli", "rust", "developer-tools", "productivity"], + "gitmail": "patches@awesome-project.dev", + "mirrors": [ + "https://gitlab.com/example/awesome-project", + "https://codeberg.org/example/awesome-project", + "https://sr.ht/~example/awesome-project" + ], + "maintainers": [ + ["Alice Johnson", "alice@awesome-project.dev"], + ["Bob Smith", "bob@awesome-project.dev"] + ], + "funding": [ + "https://github.com/sponsors/example", + "https://opencollective.com/awesome-project" + ], + "version": "1.0.0" +} -- cgit v1.2.3