mirror of
https://github.com/Smaug123/gitea-repo-config
synced 2025-10-04 23:18:40 +00:00
Rename to gitea-repo-config (#65)
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
"boolean",
|
||||
"null"
|
||||
],
|
||||
"description": "Set this to true to delete the repo. dotnet-gitea-declarative will refuse to delete any repo that is absent from configuration; the workflow is to first set its `deleted` to `true` (whereupon dotnet-gitea-declarative will delete it from Gitea) and then to delete it from configuration."
|
||||
"description": "Set this to true to delete the repo. We will refuse to delete any repo that is absent from\n configuration; the workflow is to first set its `deleted` to `true` (whereupon we will delete it from Gitea) and then to delete it from configuration."
|
||||
}
|
||||
},
|
||||
"oneOf": [
|
||||
|
@@ -117,7 +117,8 @@ type internal SerialisedRepo =
|
||||
[<Description "If this repo is to be created natively on Gitea, the information about the repo.">]
|
||||
[<JsonProperty(Required = Required.Default)>]
|
||||
Native : Nullable<SerialisedNativeRepo>
|
||||
[<Description "Set this to true to delete the repo. dotnet-gitea-declarative will refuse to delete any repo that is absent from configuration; the workflow is to first set its `deleted` to `true` (whereupon dotnet-gitea-declarative will delete it from Gitea) and then to delete it from configuration.">]
|
||||
[<Description "Set this to true to delete the repo. We will refuse to delete any repo that is absent from
|
||||
configuration; the workflow is to first set its `deleted` to `true` (whereupon we will delete it from Gitea) and then to delete it from configuration.">]
|
||||
[<JsonProperty(Required = Required.Default)>]
|
||||
Deleted : Nullable<bool>
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@
|
||||
}
|
||||
},
|
||||
"deleted-repo": {
|
||||
"description": "A repo that's been scheduled for deletion at the next run of dotnet-gitea-declarative",
|
||||
"description": "A repo that's been scheduled for deletion at the next run",
|
||||
"deleted": true,
|
||||
"native": {
|
||||
"defaultBranch": "main",
|
||||
@@ -84,7 +84,7 @@
|
||||
}
|
||||
},
|
||||
"deleted-mirror": {
|
||||
"description": "A repo that's been scheduled for deletion at the next run of dotnet-gitea-declarative",
|
||||
"description": "A repo that's been scheduled for deletion at the next run",
|
||||
"deleted": true,
|
||||
"gitHub": {
|
||||
"uri": "https://github.com/MyName/only-remaining-copy"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# .NET Declarative Gitea
|
||||
# gitea-repo-config
|
||||
|
||||
This is a small project to allow you to specify a [Gitea](https://github.com/go-gitea/) configuration in a declarative manner, and to resolve differences between intended and actual config.
|
||||
|
||||
@@ -18,11 +18,11 @@ This is a small project to allow you to specify a [Gitea](https://github.com/go-
|
||||
|
||||
Run with the `--help` argument for a full listing.
|
||||
The main argument you provide is a JSON configuration file, which should conform to [the schema](./Gitea.Declarative.Lib/GiteaConfig.schema.json); there is [an example](./Gitea.Declarative.Test/GiteaConfig.json) in the tests.
|
||||
(You can call `dotnet-gitea-declarative verify $CONFIG_PATH` to verify against the schema, or `dotnet-gitea-declarative output-schema` to output the schema for local tooling to consume.)
|
||||
(You can call `gitea-repo-config verify $CONFIG_PATH` to verify against the schema, or `gitea-repo-config output-schema` to output the schema for local tooling to consume.)
|
||||
|
||||
# How to build and run
|
||||
|
||||
* With Nix: `nix run github:Smaug123/dotnet-gitea-declarative -- reconcile --help`.
|
||||
* With Nix: `nix run github:Smaug123/gitea-repo-config -- reconcile --help`.
|
||||
* From source: clone the repository, and `dotnet run`.
|
||||
|
||||
# Demos
|
||||
|
@@ -4,7 +4,7 @@ export GITEA_TOKEN="$1"
|
||||
|
||||
function execute() {
|
||||
target="$1"
|
||||
asciinema rec --overwrite --cols 100 --env "GITEA_TOKEN,SHELL,TERM" --command 'nix run github:Smaug123/dotnet-gitea-declarative -- \
|
||||
asciinema rec --overwrite --cols 100 --env "GITEA_TOKEN,SHELL,TERM" --command 'nix run github:Smaug123/gitea-repo-config -- \
|
||||
--config-file /tmp/GiteaConfig.json \
|
||||
--gitea-host=https://gitea.patrickstevens.co.uk \
|
||||
--gitea-admin-api-token "$GITEA_TOKEN" \
|
||||
|
@@ -16,7 +16,7 @@
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
projectFile = "./Gitea.Declarative/Gitea.Declarative.fsproj";
|
||||
testProjectFile = "./Gitea.Declarative.Test/Gitea.Declarative.Test.fsproj";
|
||||
pname = "dotnet-gitea-declarative";
|
||||
pname = "gitea-repo-config";
|
||||
dotnet-sdk = pkgs.dotnet-sdk_7;
|
||||
dotnet-runtime = pkgs.dotnetCorePackages.runtime_7_0;
|
||||
version = "0.1";
|
||||
@@ -62,7 +62,7 @@
|
||||
}));
|
||||
default = pkgs.buildDotnetModule {
|
||||
pname = pname;
|
||||
name = "gitea-declarative";
|
||||
name = "gitea-repo-config";
|
||||
version = version;
|
||||
src = ./.;
|
||||
projectFile = projectFile;
|
||||
|
Reference in New Issue
Block a user