Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)
Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
"""Stellt den Default Branch auf master um."""
|
|
import urllib.request, json, ssl
|
|
|
|
secrets = {}
|
|
with open("project-audit/.secrets", "r", encoding="utf-8-sig") as f:
|
|
for line in f:
|
|
if "=" in line and not line.startswith("#"):
|
|
k, v = line.strip().split("=", 1)
|
|
secrets[k.strip()] = v.strip()
|
|
|
|
TOKEN = secrets.get("GITLAB_TOKEN_AUDIT", "")
|
|
ctx = ssl.create_default_context()
|
|
ctx.check_hostname = False
|
|
ctx.verify_mode = ssl.CERT_NONE
|
|
|
|
url = "https://git.tech.rz.db.de/api/v4/projects/AndreKnie%2Fproject-audit"
|
|
data = json.dumps({"default_branch": "master"}).encode("utf-8")
|
|
req = urllib.request.Request(url, data=data, method="PUT")
|
|
req.add_header("PRIVATE-TOKEN", TOKEN)
|
|
req.add_header("Content-Type", "application/json")
|
|
try:
|
|
resp = urllib.request.urlopen(req, context=ctx, timeout=15)
|
|
result = json.loads(resp.read().decode("utf-8"))
|
|
print(f"Default Branch jetzt: {result.get('default_branch', '?')}")
|
|
print("Erfolgreich umgestellt!")
|
|
except Exception as e:
|
|
print(f"Fehler: {e}")
|