From 1912618053b88f0f27cda8d93ec7826765cb4d77 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:59:10 +1000 Subject: [PATCH] remove `github.user` --- buildbot_nix/github_projects.py | 2 -- examples/master.nix | 4 +--- nix/checks/master.nix | 1 - nix/master.nix | 20 +++++++++++++------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/buildbot_nix/github_projects.py b/buildbot_nix/github_projects.py index ec2690d..eaf629f 100644 --- a/buildbot_nix/github_projects.py +++ b/buildbot_nix/github_projects.py @@ -443,8 +443,6 @@ class GitHubAppSecretService(SecretProviderBase): class GithubConfig: oauth_id: str | None auth_type: AuthType - # TODO unused - buildbot_user: str oauth_secret_name: str = "github-oauth-secret" webhook_secret_name: str = "github-webhook-secret" project_cache_file: Path = Path("github-project-cache-v1.json") diff --git a/examples/master.nix b/examples/master.nix index 8d9e366..450f7ac 100644 --- a/examples/master.nix +++ b/examples/master.nix @@ -19,10 +19,8 @@ # All other user in the organization will be able to restart builds or evaluations. admins = [ "Mic92" ]; github = { - # Github user used as a CI identity - user = "mic92-buildbot"; 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 }; # authType.app = { diff --git a/nix/checks/master.nix b/nix/checks/master.nix index 8b43e88..eac437a 100644 --- a/nix/checks/master.nix +++ b/nix/checks/master.nix @@ -22,7 +22,6 @@ webhookSecretFile = pkgs.writeText "webhookSecret" "00000000000000000000"; oauthSecretFile = pkgs.writeText "oauthSecret" "ffffffffffffffffffffffffffffffffffffffff"; oauthId = "aaaaaaaaaaaaaaaaaaaa"; - user = "mic92-buildbot"; }; }; }; diff --git a/nix/master.nix b/nix/master.nix index 5ad12e8..bea306f 100644 --- a/nix/master.nix +++ b/nix/master.nix @@ -5,7 +5,7 @@ }: let cfg = config.services.buildbot-nix.master; - inherit (lib) mkRenamedOptionModule; + inherit (lib) mkRemovedOptionModule mkRenamedOptionModule; in { imports = [ @@ -42,6 +42,18 @@ in "tokenFile" ] ) + (mkRemovedOptionModule + [ + "services" + "buildbot-nix" + "master" + "github" + "user" + ] + '' + Setting a user is not required. + '' + ) ]; options = { @@ -177,11 +189,6 @@ in default = null; 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 { type = lib.types.nullOr lib.types.str; default = "build-with-buildbot"; @@ -314,7 +321,6 @@ in else "GithubConfig( oauth_id=${builtins.toJSON cfg.github.oauthId}, - buildbot_user=${builtins.toJSON cfg.github.user}, topic=${builtins.toJSON cfg.github.topic}, auth_type=${ if cfg.github.authType ? "legacy" then