#!/usr/bin/env python3 """Create the Gitea repository for OpenClaw WebUI.""" import requests import sys GITEA_URL = "https://git.theta42.com/api/v1" USERNAME = "nova" PASSWORD = "ea21f1d%e2c0fHD93*21ab0" REPO_NAME = "openclaw-webui" def create_repo(): endpoint = f"{GITEA_URL}/user/repos" data = { "name": REPO_NAME, "description": "OpenWebUI-compatible chat interface for OpenClaw with LDAP SSO", "private": False, "auto_init": False } response = requests.post(endpoint, auth=(USERNAME, PASSWORD), json=data) if response.status_code == 201: repo = response.json() print(f"✅ Repository created: {repo['html_url']}") return repo['html_url'] elif response.status_code == 409: print(f"⚠️ Repository already exists") return f"https://git.theta42.com/{USERNAME}/{REPO_NAME}" else: print(f"❌ Failed to create repo: {response.status_code}") print(response.text) sys.exit(1) if __name__ == "__main__": create_repo()