File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 30
30
run : uv run commit0 evaluate-reference simpy
31
31
- name : Save
32
32
env :
33
- GIT_USERNAME : ${{ secrets.GIT_USERNAME }}
34
- GIT_PASSWORD : ${{ secrets.GIT_PASSWORD }}
35
33
GITHUB_TOKEN : ${{ secrets.MY_GITHUB_TOKEN }}
36
34
run : |
37
- git config --global user.email "[email protected] "
38
- git config --global user.name "Wenting Zhao"
39
35
uv run commit0 save simpy test-save-commit0
Original file line number Diff line number Diff line change @@ -24,13 +24,17 @@ def main(
24
24
branch : str ,
25
25
github_token : str ,
26
26
) -> None :
27
+ if github_token is None :
28
+ # Get GitHub token from environment variable if not provided
29
+ token = os .environ .get ("GITHUB_TOKEN" )
27
30
dataset : Iterator [RepoInstance ] = load_dataset (dataset_name , split = dataset_split ) # type: ignore
28
31
for example in dataset :
29
32
repo_name = example ["repo" ].split ("/" )[- 1 ]
30
33
if repo_split != "all" and repo_name not in SPLIT [repo_split ]:
31
34
continue
32
35
local_repo_path = f"{ base_dir } /{ repo_name } "
33
36
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 } @' )
34
38
35
39
# Initialize the local repository if it is not already initialized
36
40
if not os .path .exists (local_repo_path ):
You can’t perform that action at this time.
0 commit comments