-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-push.ps1
More file actions
120 lines (101 loc) · 2.89 KB
/
github-push.ps1
File metadata and controls
120 lines (101 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Push OEWA to GitHub using user-provided PAT
$token = "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"
$headers = @{
Authorization = "Bearer $token"
Accept = "application/vnd.github+json"
"X-GitHub-Api-Version" = "2022-11-28"
}
$repoName = "OEWA"
$orgOrUser = "samluo007"
Write-Host "[Step 1: Creating repo $repoName]"
# Check if repo already exists
try {
$check = Invoke-RestMethod -Uri "https://api.github.com/repos/$orgOrUser/$repoName" -Headers $headers -TimeoutSec 10
Write-Host "[Repo already exists - skipping creation]"
$repoUrl = "https://github.com/$orgOrUser/$repoName"
} catch {
# Create the repo
Write-Host "[Creating new repo...]"
$body = @{
name = $repoName
description = "Enterprise AI Agent Workflow Automation Platform - MVP 1.0"
homepage = "http://192.168.10.5:3003"
private = $false
has_wiki = $true
auto_init = $false
} | ConvertTo-Json -Compress
try {
$r = Invoke-RestMethod -Uri "https://api.github.com/user/repos" -Headers $headers -Method Post -Body $body -ContentType "application/json" -TimeoutSec 15
$repoUrl = $r.html_url
Write-Host "[Repo created: $repoUrl]"
} catch {
Write-Host "[CREATE ERROR: $($_.Exception.Message)]"
$repoUrl = "https://github.com/$orgOrUser/$repoName"
Write-Host "[Using $repoUrl]"
}
}
# Step 2: Add remote and push
$workDir = "C:\Users\Administrator\.qclaw\workspace-agent-ef4666a4"
Set-Location $workDir
# Check if git remote already set
$remote = git remote get-url origin 2>$null
if ($remote) {
Write-Host "[Remote already: $remote]"
git remote set-url origin "https://samluo007:${token}@github.com/samluo007/OEWA.git"
} else {
Write-Host "[Setting remote]"
git remote add origin "https://samluo007:${token}@github.com/samluo007/OEWA.git"
}
# Check .gitignore
if (-not (Test-Path "$workDir\.gitignore")) {
Write-Host "[Creating .gitignore]"
@"
# Python
__pycache__/
*.py[cod]
*.egg-info/
venv/
.venv/
env/
# Node
node_modules/
dist/
*.log
# IDE
.vscode/
.idea/
*.swp
# OS
.DS_Store
Thumbs.db
# Local
*.local
.env
# Project specific
*.zip
github-pat*.ps1
github-auth*.ps1
"@ | Out-File "$workDir\.gitignore" -Encoding UTF8
}
# Stage files
Write-Host "[Staging files...]"
git add -A
# Check what will be committed
$status = git status --short
Write-Host "=== FILES TO COMMIT ==="
Write-Host $status
# Commit
Write-Host "[Committing...]"
git commit -m "feat: OEWA v1.0 - Enterprise AI Agent Workflow Automation Platform
- FastAPI backend with workflow execution engine
- Vue3 frontend with visual flow canvas
- 3 industry templates (ecommerce/marketing/data)
- Docker deployment ready
- CRUD API + monitoring dashboard
- Real LLM integration (GPT-4o)
MVP completed May 7-8, 2026" 2>&1
# Push
Write-Host "[Pushing to GitHub...]"
git push origin master 2>&1
Write-Host "[PUSH DONE]"
Write-Host "[REPO URL: $repoUrl]"