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:
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")

View file

@ -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 = {

View file

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

View file

@ -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