Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
python -m unittest test_sbg.py
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GitLab Group Cloner & Updater

[![CI](https://github.com/tutunak/sb-gitlab/actions/workflows/ci.yml/badge.svg)](https://github.com/sb-gitlab/sb-gitlab/actions/workflows/ci.yml)

A command-line Python tool to **clone** or **update** (_pull_) **all** GitLab repositories under one or more groups (including nested subgroups), organizing them into a mirror directory tree that matches each project’s namespace.

---
Expand Down Expand Up @@ -41,7 +43,7 @@ A command-line Python tool to **clone** or **update** (_pull_) **all** GitLab re
## Usage

```bash
python clone_or_update_groups_by_namespace.py \
python sbg.py \
--gitlab-url \
--token \
--group-ids [ …] \
Expand Down Expand Up @@ -69,7 +71,7 @@ Arguments:
Clone or update all projects under group **42** into `./repos` via HTTPS:

```bash
python clone_or_update_groups_by_namespace.py \
python sbg.py \
--gitlab-url https://gitlab.com \
--token $GITLAB_TOKEN \
--group-ids 42 \
Expand All @@ -79,7 +81,7 @@ python clone_or_update_groups_by_namespace.py \
Clone or update projects from two groups by full path, using SSH:

```bash
python clone_or_update_groups_by_namespace.py \
python sbg.py \
--gitlab-url https://gitlab.example.com \
--token $GITLAB_TOKEN \
--group-ids team/backend team/frontend \
Expand Down