From 911e330c0948231b8141474827f1ce22aaba1345 Mon Sep 17 00:00:00 2001 From: Elvin Luff Date: Wed, 27 May 2026 20:13:03 +0200 Subject: [PATCH] [core] Add Codeberg as a supported git url (#16501) --- esphome/git.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/git.py b/esphome/git.py index 744ce35ef6..c4a612753b 100644 --- a/esphome/git.py +++ b/esphome/git.py @@ -341,6 +341,7 @@ def clone_or_update( GIT_DOMAINS = { + "codeberg": "codeberg.org", "github": "github.com", "gitlab": "gitlab.com", } @@ -363,6 +364,8 @@ class GitFile: def raw_url(self) -> str: if self.ref is None: raise ValueError("URL has no ref") + if self.domain == "codeberg.org": + return f"https://codeberg.org/{self.owner}/{self.repo}/raw/commit/{self.ref}/{self.filename}" if self.domain == "github.com": return f"https://raw.githubusercontent.com/{self.owner}/{self.repo}/{self.ref}/{self.filename}" if self.domain == "gitlab.com":