ansys.tools.repo_sync
#
Tool to synchronize the content of different repositories.
Submodules#
Package Contents#
Functions#
|
Synchronize a folder to a remote repository. |
- ansys.tools.repo_sync.synchronize(owner: str, repository: str, token: str, from_dir: str, to_dir: str, include_manifest: str, branch_checked_out: str = 'main', clean_to_dir: bool = False, clean_to_dir_based_on_manifest: bool = False, dry_run: bool = False, skip_ci: bool = False, random_branch_name: bool = False) str | None #
Synchronize a folder to a remote repository.
- Parameters:
- owner
str
Repository owner (user or organization).
- repository
str
Repository name.
- token
str
GitHub access token.
- from_dir
str
Directory from which files want to be synced.
- to_dir
str
Directory to which files want to be synced (w.r.t. the root of the repository).
- include_manifest
str
Path to manifest which mentions accepted extension files.
- branch_checked_out
str
,optional
Branch to check out, by default “main”.
- clean_to_dirbool,
optional
Delete the content inside the directory where the files will be synced, by default
False
.- clean_to_dir_based_on_manifestbool,
optional
In case
clean_to_dir
is requested, perform the cleanup of files that match the regex in the manifest. By default,False
. Ifclean_to_dir
isFalse
, this option will not have an effect.- dry_runbool,
optional
Simulate the behavior of the synchronization without performing it, by default
False
.- skip_cibool,
optional
Whether to add a
[skip ci]
prefix to the commit message or not. By defaultFalse
.- random_branch_namebool,
optional
For testing purposes - generates a random suffix for the branch name
sync/file-sync
.
- owner
- Returns: