Skip to content

multigit-com/python

Repository files navigation

multigit cloning for many different organization, branches, projects on github

  • load projects from .projects file
  • load branches from .branches file
  • load all project from each organization on .orgs file list

options:

  • if repo is existing, trying to pull
  • don't clone forked repo
  • check if each project has correct structure, projects, files inside, based on .structure file
    • if they don't have create a repo in org and clone

Init

git clone https://github.com/docutemp/templates.git

start

local

python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install requests
python3 ./multigit.py ~/github

Init

python update

sudo python3 -m pip install --upgrade pip

local

python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install requests

init requirements

pip freeze > requirements.txt

install dependencies

pip install -r requirements.txt

clone

git clone https://github.com/multigit-com/python.git

configuration

chmod +x ./init.sh
./init.sh github-username

packages

python3 -m pip install requests     # for Python 3.x

refactoring

python3 splitup.py multigit.py function
python3 depend.py function

How to start

The script multigit.py executes a shell command (git clone) for each repository. This command requires that you have git installed and properly configured on your system. Please note that you should have appropriate permissions to clone the repositories that you're trying to access, otherwise, you may run into authentication issues. Additionally, GitHub API tokens are sensitive and should be kept secure. If you accidentally expose your token, make sure to revoke it immediately and generate a new one.

  • Before running the script, ensure you have Git installed on your system and that the script has execute permissions.
  • To use this script, you must have:
    • A file named .orgs in the same directory as the script, containing a list of organization names, each on a new line.
    • A file named .token in the same directory as the script, containing your GitHub API token
python3 ./multigit.py ~/github

check list of folders (organizations) and included subfolders (projects)

cd  ~/github
find . -maxdepth 1 -mindepth 1 -type d -exec sh -c 'echo "{}: $(find "{}" -maxdepth 1 -mindepth 1 -type d | wc -l)"' \;

? optional parameter

! mandatory parameter

: equivalent name of function parameter

Object: repo_descr="description of github repository"

Example: Update description "Description for my " on gitHub repository myrepo on GitHub

Update description !description on gitHub repository !name:repo_name

update_repo_on_github(api_token, org_name, repo_name, description, domain):

Text To Service

  • by voice
  • by shell
  • by web app

API handler

Test framework

More

API documentation

Another solution


About

python.multigit.com

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published