:py:mod:`ansys.tools.repo_sync` =============================== .. py:module:: ansys.tools.repo_sync .. autoapi-nested-parse:: Tool to synchronize the content of different repositories. .. !! processed by numpydoc !! Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 repo_sync/index.rst Package Contents ---------------- Functions ~~~~~~~~~ .. autoapisummary:: ansys.tools.repo_sync.synchronize .. py:function:: 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) -> Union[str, None] Synchronize a folder to a remote repository. :Parameters: **owner** : :class:`python:str` Repository owner (user or organization). **repository** : :class:`python:str` Repository name. **token** : :class:`python:str` GitHub access token. **from_dir** : :class:`python:str` Directory from which files want to be synced. **to_dir** : :class:`python:str` Directory to which files want to be synced (w.r.t. the root of the repository). **include_manifest** : :class:`python:str` Path to manifest which mentions accepted extension files. **branch_checked_out** : :class:`python:str`, :obj:`optional` Branch to check out, by default "main". **clean_to_dir** : :ref:`bool `, :obj:`optional` Delete the content inside the directory where the files will be synced, by default ``False``. **clean_to_dir_based_on_manifest** : :ref:`bool `, :obj:`optional` In case ``clean_to_dir`` is requested, perform the cleanup of files that match the regex in the manifest. By default, ``False``. If ``clean_to_dir`` is ``False``, this option will not have an effect. **dry_run** : :ref:`bool `, :obj:`optional` Simulate the behavior of the synchronization without performing it, by default ``False``. **skip_ci** : :ref:`bool `, :obj:`optional` Whether to add a ``[skip ci]`` prefix to the commit message or not. By default ``False``. **random_branch_name** : :ref:`bool `, :obj:`optional` For testing purposes - generates a random suffix for the branch name ``sync/file-sync``. :Returns: :obj:`Union`\[:class:`python:str`, :data:`python:None`] Pull request URL. In case of dry-run or no files modified, ``None`` is returned. .. !! processed by numpydoc !!