Skip to content

Commit 8ab6d7f

Browse files
committed
fix ci error
1 parent 9d3cee0 commit 8ab6d7f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/system.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
run: uv run commit0 evaluate-reference simpy
3131
- name: Save
3232
env:
33-
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
34-
GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }}
3533
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
3634
run: |
37-
git config --global user.email "[email protected]"
38-
git config --global user.name "Wenting Zhao"
3935
uv run commit0 save simpy test-save-commit0

commit0/harness/save.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ def main(
2424
branch: str,
2525
github_token: str,
2626
) -> None:
27+
if github_token is None:
28+
# Get GitHub token from environment variable if not provided
29+
token = os.environ.get("GITHUB_TOKEN")
2730
dataset: Iterator[RepoInstance] = load_dataset(dataset_name, split=dataset_split) # type: ignore
2831
for example in dataset:
2932
repo_name = example["repo"].split("/")[-1]
3033
if repo_split != "all" and repo_name not in SPLIT[repo_split]:
3134
continue
3235
local_repo_path = f"{base_dir}/{repo_name}"
3336
github_repo_url = f"https://github.com/{organization}/{repo_name}.git"
37+
github_repo_url = github_repo_url.replace('https://', f'https://x-access-token:{token}@')
3438

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

0 commit comments

Comments
 (0)