Skip to content

Commit

Permalink
fix ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
wenting-zhao committed Sep 13, 2024
1 parent 9d3cee0 commit 8ab6d7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
run: uv run commit0 evaluate-reference simpy
- name: Save
env:
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
run: |
git config --global user.email "wentingzhao@outlook.com"
git config --global user.name "Wenting Zhao"
uv run commit0 save simpy test-save-commit0
4 changes: 4 additions & 0 deletions commit0/harness/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ def main(
branch: str,
github_token: str,
) -> None:
if github_token is None:
# Get GitHub token from environment variable if not provided
token = os.environ.get("GITHUB_TOKEN")
dataset: Iterator[RepoInstance] = load_dataset(dataset_name, split=dataset_split) # type: ignore
for example in dataset:
repo_name = example["repo"].split("/")[-1]
if repo_split != "all" and repo_name not in SPLIT[repo_split]:
continue
local_repo_path = f"{base_dir}/{repo_name}"
github_repo_url = f"https://github.com/{organization}/{repo_name}.git"
github_repo_url = github_repo_url.replace('https://', f'https://x-access-token:{token}@')

# Initialize the local repository if it is not already initialized
if not os.path.exists(local_repo_path):
Expand Down

0 comments on commit 8ab6d7f

Please sign in to comment.