Skip to main content

CLI to replace HTTP GET on GitHub API with clones

Project description

GHAPI-conversion

Python version range License Linting, testing, coverage, and release Tested OSs, others may work Documentation coverage codecov Code style: black Imports: isort PyPi: release

CLI to replace HTTP GET on GitHub API with clones.

Why

In GitHub Actions the macOS machines share the same IP range, meaning that users will come against the GitHub quota often. https://github.com/actions/virtual-environments/issues/602

To overcome this issue, use this tool instead of pip install -r. This tool clones rather than GETs:

  • https://api.github.com/repos/<org>/<repo>/zipball#egg=<package_name>
  • https://raw.githubusercontent.com/<org>/<repo>/<branch>/<file>

Additionally, it reuses already cloned repos.

Install package

PyPi

pip install ghapi-conversion

Development

Install dependencies

pip install -r requirements.txt
# On Python 2.7, `pip install mock` in order to run the tests without error

Install package

pip install -e .

Usage

$ python -m ghapi_conversion --help

usage: __main__.py [-h] [--version] (-r FILE | -l LINK)

CLI to replace HTTP GET on GitHub API with clones

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -r FILE, --requirement FILE
                        Install from the given requirements file. This option
                        can be used multiple times.
  -l LINK, --link LINK  Clone instead of HTTPS GET a
                        `https://api.github.com/repos/<org>/<repo>/zipball` or
                        `https://raw.githubusercontent.com/<org>/<repo>/<branch
                        >` link.

Alternatives

  • Manually replace current setup with clones, non GitHub API—or authed—hosted alternatives
  • Pack dependencies and download and extract this archive from non GitHub API—or authed—hosted alternative
  • Seamlessly do what ghapi_conversion does, by self-hosting a proxy server

License

CC0.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the CC0 license, shall be licensed under CC0, without any additional terms or conditions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ghapi-conversion, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size ghapi_conversion-0.0.7-py3-none-any.whl (13.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ghapi_conversion-0.0.7.tar.gz (9.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page