Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

workflow_alerts: name the repo in the User-Agent (CUA-2258) (#5931)

cua-agents[bot]14b22f552b3e
diff --git a/.github/scripts/workflow_alerts.py b/.github/scripts/workflow_alerts.py
index 5c63ae2c34..b4f890496b 100644
--- a/.github/scripts/workflow_alerts.py
+++ b/.github/scripts/workflow_alerts.py
@@ -121,7 +121,9 @@ def build_alert(run: dict, name: str, repo: str, environment: str, now: dt.datet
def http_json(url: str, token: str = "", data: object = None, attempts: int = 3, extra_headers: dict | None = None):
body = None if data is None else json.dumps(data).encode()
- headers = {"Accept": "application/vnd.github+json", "User-Agent": "workflow-alerts"}
+ # The repository is part of the agent so the alert intake log says which repo posted.
+ agent = "workflow-alerts-" + os.environ.get("GITHUB_REPOSITORY", "local").replace("/", "-")
+ headers = {"Accept": "application/vnd.github+json", "User-Agent": agent}
if body is not None:
headers["Content-Type"] = "application/json"
if token: