Download the PHP package devshop/github-api-cli without Composer

On this page you can find all versions of the php package devshop/github-api-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package github-api-cli

GitHub API CLI Component

The GitHubApiCli component a simple console wrapper for the GitHub API to allow abstract command line interaction.

Built on knp-labs/github-api.

Usage

Commands

github api

Passes directly to `GitHub\Api\AbstractAPI classes.

Only "show" works right now, but it should successfully return any object.

Load info about an organization:

Show info about a repo:

github deployment:start

Creates a new deployment and saves the ID as a git config item.

bin/github deployment:start --environment=dev --description="Manual deployment triggered as an example."

Then use deployment:update to change the status.

github deployment:update

Updates the status of a deployment.

bin/github deployment:update --state=in_progress --description="Building our thing..." --log_url=$OUR_BUILD_LOGS_URL

You can use bash operators to set different state based on exit code of a script.

Use && after a command to designate a command to run on success. Use || after a command to designate a command to run on failure.

deploy.sh \
   && bin/github deployment:update --state=success --description="This deployment update will only happen if deploy.sh returns exit code 0" \
   || ( bin/github deployment:update --state=failure --description="This deployment update will only happen if deploy.sh returns exit 1." && exit 1 )

See The DevShop Build tests as an example https://github.com/opendevshop/devshop/blob/09fbf10286994c378fa24cf6b9f91e9df33928dd/.github/workflows/build.yml#L110

If you are using a CI runner, be sure to exit 1 after the failure command, to ensure the overall script exits with a failure as well.

SSL Issues

If you encounter any SSL errors, such as the one below, you can tell the HTTPClient Library Guzzle to skip SSL verification.

60: SSL certificate problem: self signed certificate in certificate chain

All DevShop components that use the GitHub API can be configured to skip the SSL certificate verification. Set the following environment variable to ignore SSL errors:

export DEVSHOP_GITHUB_API_IGNORE_SSL=1

See YamlTasksConsoleCommand.php and GitHubApiCli.php to see the implementation.

Resources

Credits

$CREDITS


All versions of github-api-cli with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1||^8.0
consolidation/robo Version ^2
knplabs/github-api Version ^3.9||^1.0
devshop/git-traits Version @dev
guzzlehttp/guzzle Version ^6
php-http/guzzle6-adapter Version 2.x-dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devshop/github-api-cli contains the following files

Loading the files please wait ...