Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ The following instances run on GitHub:
[Configuration](https://github.com/nix-community/infra/tree/master/modules/nixos)
| [Instance](https://buildbot.nix-community.org/)
- [**Mic92's dotfiles**](https://github.com/Mic92/dotfiles):
[Configuration](https://github.com/Mic92/dotfiles/blob/main/nixos/eve/modules/buildbot.nix)
[Configuration](https://github.com/Mic92/dotfiles/blob/main/machines/eve/modules/buildbot.nix)
| [Instance](https://buildbot.thalheim.io/)
- [**Technical University Munich**](https://dse.in.tum.de/):
[Configuration](https://github.com/TUM-DSE/doctor-cluster-config/tree/master/modules/buildbot)
Expand Down
4 changes: 4 additions & 0 deletions buildbot_nix/buildbot_nix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .errors import BuildbotNixError
from .gitea_projects import GiteaBackend
from .github_projects import GithubBackend
from .gitlab_project import GitlabBackend
from .local_worker import NixLocalWorker
from .models import AuthBackendConfig, BuildbotNixConfig
from .nix_build import BuildConfig
Expand Down Expand Up @@ -63,6 +64,9 @@ def _initialize_backends(self) -> dict[str, GitBackend]:
if self.config.gitea is not None:
backends["gitea"] = GiteaBackend(self.config.gitea, self.config.url)

if self.config.gitlab is not None:
backends["gitlab"] = GitlabBackend(self.config.gitlab, self.config.url)

if self.config.pull_based is not None:
backends["pull_based"] = PullBasedBacked(self.config.pull_based)

Expand Down
4 changes: 3 additions & 1 deletion buildbot_nix/buildbot_nix/build_canceller.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
from .projects import GitProject


def branch_key_for_pr(build: dict[str, Any]) -> str:
def branch_key_for_pr(build: dict[str, Any]) -> str | None:
"""Extract a unique key for PR/change to cancel old builds."""
branch = build.get("branch", "")
if branch is None:
return None

# For GitHub/Gitea/GitLab PRs
if branch.startswith(("refs/pull/", "refs/merge-requests/")):
Expand Down
Loading
Loading