remove github.user

This commit is contained in:
zowoq 2024-06-14 18:59:10 +10:00 committed by mergify[bot]
parent aaab03e1da
commit 1912618053
4 changed files with 14 additions and 13 deletions

View file

@ -443,8 +443,6 @@ class GitHubAppSecretService(SecretProviderBase):
class GithubConfig: class GithubConfig:
oauth_id: str | None oauth_id: str | None
auth_type: AuthType auth_type: AuthType
# TODO unused
buildbot_user: str
oauth_secret_name: str = "github-oauth-secret" oauth_secret_name: str = "github-oauth-secret"
webhook_secret_name: str = "github-webhook-secret" webhook_secret_name: str = "github-webhook-secret"
project_cache_file: Path = Path("github-project-cache-v1.json") project_cache_file: Path = Path("github-project-cache-v1.json")

View file

@ -19,10 +19,8 @@
# All other user in the organization will be able to restart builds or evaluations. # All other user in the organization will be able to restart builds or evaluations.
admins = [ "Mic92" ]; admins = [ "Mic92" ];
github = { github = {
# Github user used as a CI identity
user = "mic92-buildbot";
authType.legacy = { authType.legacy = {
# Github token of the same user # Github user token used as a CI identity
tokenFile = pkgs.writeText "github-token" "ghp_000000000000000000000000000000000000"; # FIXME: replace this with a secret not stored in the nix store tokenFile = pkgs.writeText "github-token" "ghp_000000000000000000000000000000000000"; # FIXME: replace this with a secret not stored in the nix store
}; };
# authType.app = { # authType.app = {

View file

@ -22,7 +22,6 @@
webhookSecretFile = pkgs.writeText "webhookSecret" "00000000000000000000"; webhookSecretFile = pkgs.writeText "webhookSecret" "00000000000000000000";
oauthSecretFile = pkgs.writeText "oauthSecret" "ffffffffffffffffffffffffffffffffffffffff"; oauthSecretFile = pkgs.writeText "oauthSecret" "ffffffffffffffffffffffffffffffffffffffff";
oauthId = "aaaaaaaaaaaaaaaaaaaa"; oauthId = "aaaaaaaaaaaaaaaaaaaa";
user = "mic92-buildbot";
}; };
}; };
}; };

View file

@ -5,7 +5,7 @@
}: }:
let let
cfg = config.services.buildbot-nix.master; cfg = config.services.buildbot-nix.master;
inherit (lib) mkRenamedOptionModule; inherit (lib) mkRemovedOptionModule mkRenamedOptionModule;
in in
{ {
imports = [ imports = [
@ -42,6 +42,18 @@ in
"tokenFile" "tokenFile"
] ]
) )
(mkRemovedOptionModule
[
"services"
"buildbot-nix"
"master"
"github"
"user"
]
''
Setting a user is not required.
''
)
]; ];
options = { options = {
@ -177,11 +189,6 @@ in
default = null; default = null;
description = "Github oauth id. Used for the login button"; description = "Github oauth id. Used for the login button";
}; };
# Most likely you want to use the same user as for the buildbot
user = lib.mkOption {
type = lib.types.str;
description = "Github user that is used for the buildbot";
};
topic = lib.mkOption { topic = lib.mkOption {
type = lib.types.nullOr lib.types.str; type = lib.types.nullOr lib.types.str;
default = "build-with-buildbot"; default = "build-with-buildbot";
@ -314,7 +321,6 @@ in
else else
"GithubConfig( "GithubConfig(
oauth_id=${builtins.toJSON cfg.github.oauthId}, oauth_id=${builtins.toJSON cfg.github.oauthId},
buildbot_user=${builtins.toJSON cfg.github.user},
topic=${builtins.toJSON cfg.github.topic}, topic=${builtins.toJSON cfg.github.topic},
auth_type=${ auth_type=${
if cfg.github.authType ? "legacy" then if cfg.github.authType ? "legacy" then