Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitamalinov committed Feb 23, 2024
1 parent faf703b commit 61f9b2e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions services/github/labeled_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import git
import jwt
import openai
import subprocess

# Local imports
from agent.coders import Coder
Expand All @@ -18,8 +19,6 @@
from .github_manager import github_access_token




async def handle_issue_labeled(payload: GitHubLabeledPayload):
label: str = payload["label"]["name"]
model = ''
Expand All @@ -37,6 +36,12 @@ async def handle_issue_labeled(payload: GitHubLabeledPayload):

new_uuid = uuid.uuid4()

repo_dir = '/tmp/repo'
os.makedirs(repo_dir, exist_ok=True)
print('make dir')
subprocess.run(['git', 'clone', f' https://x-access-token:{token}@github.com/nikitamalinov/lalager.git', repo_dir], check=True)
print('FINISHED')
return
# Create and get into tmp folder
original_path: str = os.getcwd()
tmp_folder = '/tmp'
Expand All @@ -47,11 +52,9 @@ async def handle_issue_labeled(payload: GitHubLabeledPayload):
os.chdir(tmp_folder)

try:
print('listing: ')
os.system(f'ls')
print('current dir: ')
os.system(f'pwd')
print("created folder")
repo_dir = '/tmp/repo'
os.makedirs(repo_dir, exist_ok=True)
subprocess.run(['git', 'clone', f' https://x-access-token:{token}@github.com/nikitamalinov/lalager.git', repo_dir], check=True)

print(f'git clone https://x-access-token:{token}@github.com/nikitamalinov/lalager.git')
print('listing: ')
Expand Down

0 comments on commit 61f9b2e

Please sign in to comment.