Skip to content

offscale/GHAPI-conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. actions/runner-images#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.

About

CLI to replace HTTP GET on GitHub API with clones

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages