🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

ghapi-conversion

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghapi-conversion

CLI to replace HTTP GET on GitHub API with clones

0.0.7
PyPI
Maintainers
1

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.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts