Skip to main content

GitHub-Backup

Project description

Application for backing up information about a GitHub organization

Installation

You can clone this repository and set up the environment directly from the command line using the following command:

git clone git@github.com:cloud-labs-infra/github-backup.git
cd github-backup
poetry install

Testing

You can run the tests using the following command:

poetry run pytest --cov=./ --cov-report=xml

This command runs all unit tests and calculates coverage

Usage

CLI Usage is as follows:

poetry run backup-github [-h] [-t TOKEN] [-o OUTPUT_DIR] [-r REPOSITORY [REPOSITORY ...]] [-i] [-p] [-m]
                                           [--all]
                                           ORGANIZATION_NAME

Backup a GitHub organization

positional arguments:
  ORGANIZATION_NAME                     github organization name

options:
  -h, --help                            show this help message and exit
  -t TOKEN, --token TOKEN
                                        personal token
  -o OUTPUT_DIR, --output-directory OUTPUT_DIR
                                        directory for backup
  -r REPOSITORY [REPOSITORY ...], --repository REPOSITORY [REPOSITORY ...]
                                        name of repositories to limit backup
  -i, --issues                          run backup of issues
  -p, --pulls                           run backup of pulls
  -m, --members                         run backup of members
  --all                                 run backup of all data

Backup structure

.
└── organization
    ├── members
    │ └── login1
    │     ├── member.json
    │     └── membership.json
    └── repos
        └── repo1
            ├── content
            │ └── repo1.git
            ├── issues
            │ └── 1
            │     ├── assignee.json
            │     ├── comments
            │     ├── issue.json
            │     └── user.json
            ├── pulls
            │ └── 2
            │     ├── assignee.json
            │     ├── base.json
            │     ├── comments
            │     │ └── 1
            │     │     ├── comment.json
            │     │     └── user.json
            │     ├── head.json
            │     ├── pull.json
            │     ├── reviews
            │     │ ├── 1
            │     │ │   ├── review.json
            │     │ │   └── user.json
            │     │ └── 2
            │     │     ├── comments
            │     │     │ └── 1
            │     │     │     ├── comment.json
            │     │     │     └── user.json
            │     │     ├── review.json
            │     │     └── user.json
            │     └── user.json
            └── repo.json

Project status

The project is currently in a development state

Metadata

Release files for backup-github-org 1.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backup-github-org 1.0.10
File Size Uploaded
backup_github_org-1.0.10.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for backup-github-org 1.0.10
File Interpreter ABI Platform
backup_github_org-1.0.10-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / backup_github_org-1.0.10.tar.gz

Download URL backup_github_org-1.0.10.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2062a57867965522d1918a8c65fe8952ac0e2ca127a2d39c43a763291a6ea9b3
BLAKE2b-256 checksum
How to use checksums
cf4f7f7384450528c02f24a58f2b1f9925b7945b5f42e179689a547e3088249c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.13 Linux/5.15.0-1047-azure

Release files / backup_github_org-1.0.10-py3-none-any.whl

Download URL backup_github_org-1.0.10-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22b3004a3b0995c46d6b5a5e7be682aecd5035414b877f7135c171e102cc1395
BLAKE2b-256 checksum
How to use checksums
0e0f744e9f3b5c51b65375d8faac936691f0fe7c2cfa48f6ea833ff5cdf5a35b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.13 Linux/5.15.0-1047-azure

Release history Release notifications | RSS feed

This release

1.0.10 This release

2 release files

1.0.9

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page