fix: log source branch file count #33
3
sync.py
3
sync.py
|
|
@ -261,6 +261,9 @@ async def sync_oneway_inter_code(project: ProjectDTO, job: JobDTO):
|
|||
repo_dir = dir + "/" + project.name
|
||||
|
||||
await cmd.shell('git status', repo_dir, job)
|
||||
tracked_files, err = await cmd.shell('git ls-files', repo_dir, job)
|
||||
tracked_files = [item for item in str.splitlines(tracked_files) if item]
|
||||
await Log(LogType.INFO, f"The source branch {job.gitlab_branch} has {len(tracked_files)} tracked files", job.id)
|
||||
await cmd.shell(
|
||||
f"git remote add github {project.github_address}", repo_dir, job)
|
||||
await cmd.shell('git fetch github', repo_dir, job)
|
||||
|
|
|
|||
Loading…
Reference in New Issue