Spaces:
Running
on
Zero
Running
on
Zero
df
Browse files- mysite/interpreter/process.py +1 -1
- mysite/libs/github.py +2 -2
mysite/interpreter/process.py
CHANGED
@@ -99,7 +99,7 @@ def process_file(fileobj, prompt, foldername,token=None):
|
|
99 |
text=True,
|
100 |
)
|
101 |
stdout, stderr = proc.communicate(input="n\ny\ny\n")
|
102 |
-
url = github(token)
|
103 |
return f"Processed url:{url}\nContent:\n{stdout}\n\nMake Command Output:\n{stdout}\n\nMake Command Error:\n{stderr}"
|
104 |
except subprocess.CalledProcessError as e:
|
105 |
return f"Processed url:{url}\nContent:\n{stdout}\n\nMake Command Error:\n{e.stderr}"
|
|
|
99 |
text=True,
|
100 |
)
|
101 |
stdout, stderr = proc.communicate(input="n\ny\ny\n")
|
102 |
+
url = github(token,foldername)
|
103 |
return f"Processed url:{url}\nContent:\n{stdout}\n\nMake Command Output:\n{stdout}\n\nMake Command Error:\n{stderr}"
|
104 |
except subprocess.CalledProcessError as e:
|
105 |
return f"Processed url:{url}\nContent:\n{stdout}\n\nMake Command Error:\n{e.stderr}"
|
mysite/libs/github.py
CHANGED
@@ -5,7 +5,7 @@ import string
|
|
5 |
import random
|
6 |
import shutil
|
7 |
|
8 |
-
def github(token:any):
|
9 |
# GitHubユーザー名とトークンを環境変数として定義
|
10 |
GITHUB_USERNAME = "miyataken999"
|
11 |
GITHUB_TOKEN = token
|
@@ -56,7 +56,7 @@ def github(token:any):
|
|
56 |
|
57 |
# ローカルリポジトリを初期化してコミット
|
58 |
run_command("git init")
|
59 |
-
run_command("git add -f /home/user/app/controllers")
|
60 |
run_command('git commit -m "Initial commit"')
|
61 |
|
62 |
# git filter-branchの警告を無視する設定
|
|
|
5 |
import random
|
6 |
import shutil
|
7 |
|
8 |
+
def github(token:any,folder:any):
|
9 |
# GitHubユーザー名とトークンを環境変数として定義
|
10 |
GITHUB_USERNAME = "miyataken999"
|
11 |
GITHUB_TOKEN = token
|
|
|
56 |
|
57 |
# ローカルリポジトリを初期化してコミット
|
58 |
run_command("git init")
|
59 |
+
run_command(f"git add -f /home/user/app/controllers/{folder}/*")
|
60 |
run_command('git commit -m "Initial commit"')
|
61 |
|
62 |
# git filter-branchの警告を無視する設定
|