diff --git a/examples/master.nix b/examples/master.nix index 4677af0..de5cc4f 100644 --- a/examples/master.nix +++ b/examples/master.nix @@ -21,8 +21,11 @@ github = { # Github user used as a CI identity user = "mic92-buildbot"; - # Github token of the same user - tokenFile = pkgs.writeText "github-token" "ghp_000000000000000000000000000000000000"; # FIXME: replace this with a secret not stored in the nix store + authType.legacy = { + enable = true; + # Github token of the same user + tokenFile = pkgs.writeText "github-token" "ghp_000000000000000000000000000000000000"; # FIXME: replace this with a secret not stored in the nix store + }; # A random secret used to verify incoming webhooks from GitHub # buildbot-nix will set up a webhook for each project in the organization webhookSecretFile = pkgs.writeText "webhookSecret" "00000000000000000000"; # FIXME: replace this with a secret not stored in the nix store diff --git a/nix/checks/master.nix b/nix/checks/master.nix index d79d31e..9c06c2c 100644 --- a/nix/checks/master.nix +++ b/nix/checks/master.nix @@ -16,7 +16,10 @@ ''; admins = [ "Mic92" ]; github = { - tokenFile = pkgs.writeText "github-token" "ghp_000000000000000000000000000000000000"; + authType.legacy = { + enable = true; + tokenFile = pkgs.writeText "github-token" "ghp_000000000000000000000000000000000000"; + }; webhookSecretFile = pkgs.writeText "webhookSecret" "00000000000000000000"; oauthSecretFile = pkgs.writeText "oauthSecret" "ffffffffffffffffffffffffffffffffffffffff"; oauthId = "aaaaaaaaaaaaaaaaaaaa"; diff --git a/nix/master.nix b/nix/master.nix index 329a34d..73d2602 100644 --- a/nix/master.nix +++ b/nix/master.nix @@ -320,7 +320,7 @@ in ) '' else - throw "Universe broke" + throw "One of AuthTypeApp or AuthTypeLegacy must be enabled" } )" }, diff --git a/pyproject.toml b/pyproject.toml index 17d67e6..c0b6710 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,8 @@ scripts = { buildbot-effects = "hercules_effects.cli:main" } [tool.setuptools] packages = [ "buildbot_nix", + "buildbot_nix.github", + "buildbot_nix.github.auth", "buildbot_effects" ] @@ -82,6 +84,17 @@ ignore = [ # not compatible with twisted logger: https://docs.twisted.org/en/twisted-18.7.0/core/howto/logger.html "G010", # Logging statement uses `warn` instead of `warning` + + # gives falls positives and isn't hard to check munually + "ERA001" +] + +[tool.ruff.lint.pep8-naming] +ignore-names = [ + "checkConfig", + "baseURL", + "reconfigService", + "sendMessage", ] [tool.mypy]