mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
notify_refs; rename studio_url to base_url (#9303)
This commit is contained in:
@@ -58,7 +58,7 @@ def notify_refs_to_studio(
|
||||
|
||||
_, repo_url = get_remote_repo(repo.scm.dulwich.repo, git_remote)
|
||||
studio_url = config.get("studio_url")
|
||||
d = studio.notify_refs(repo_url, token, studio_url=studio_url, **refs)
|
||||
d = studio.notify_refs(repo_url, token, base_url=studio_url, **refs)
|
||||
return d.get("url")
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -40,7 +40,7 @@ def notify_refs(
|
||||
repo_url: str,
|
||||
token: str,
|
||||
*,
|
||||
studio_url: Optional[str] = STUDIO_URL,
|
||||
base_url: Optional[str] = STUDIO_URL,
|
||||
**refs: List[str],
|
||||
) -> Dict[str, Any]:
|
||||
extra_keys = refs.keys() - {"pushed", "removed"}
|
||||
@@ -52,12 +52,12 @@ def notify_refs(
|
||||
|
||||
logger.debug(
|
||||
"notifying Studio%s about updated experiments",
|
||||
f" ({studio_url})" if studio_url else "",
|
||||
f" ({base_url})" if base_url else "",
|
||||
)
|
||||
data = {"repo_url": repo_url, "client": "dvc", "refs": refs}
|
||||
|
||||
try:
|
||||
r = post("/webhook/dvc", token, data, base_url=studio_url)
|
||||
r = post("/webhook/dvc", token, data, base_url=base_url)
|
||||
except requests.RequestException as e:
|
||||
logger.trace("", exc_info=True) # type: ignore[attr-defined]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user