mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 03:42:20 +01:00
Fix import_full_config for adoption configs (#4197)
* Fix git raw url * Fix setting full config query param * Force dashboard import urls to have a branch or tag reference for full import
This commit is contained in:
@@ -129,9 +129,9 @@ class GitFile:
|
||||
def raw_url(self) -> str:
|
||||
if self.ref is None:
|
||||
raise ValueError("URL has no ref")
|
||||
if self.domain == "github":
|
||||
if self.domain == "github.com":
|
||||
return f"https://raw.githubusercontent.com/{self.owner}/{self.repo}/{self.ref}/{self.filename}"
|
||||
if self.domain == "gitlab":
|
||||
if self.domain == "gitlab.com":
|
||||
return f"https://gitlab.com/{self.owner}/{self.repo}/-/raw/{self.ref}/{self.filename}"
|
||||
raise NotImplementedError(f"Git domain {self.domain} not supported")
|
||||
|
||||
|
Reference in New Issue
Block a user