git pull all repo in current folder
from pathlib import Path

# Replace '.' with your directory path
directory = Path('.') 

# List all files and folders
for item in directory.iterdir():
    # if dir
    if item.is_dir():
        # check if .git exists
        git_dir = item / '.git'
        if git_dir.exists() and git_dir.is_dir():
            print(f"{item.name} is a git repository")
            
            # run git pull in there
            import subprocess
            subprocess.run(['git', '-C', str(item), 'pull'])

mvn install all repo

from pathlib import Path

# Replace '.' with your directory path
directory = Path('.') 

# List all files and folders
for item in directory.iterdir():
    # if dir
    if item.is_dir():
        # check if .git exists
        git_dir = item / 'pom.xml'
        if git_dir.exists() and git_dir.is_file():
            print(f"{item.name} has a pom.xml file")
            
            # run mvn install in there
            import subprocess
            subprocess.run(['mvn', '-f', str(item / 'pom.xml'), '-DskipTests', 'clean', 'install'])