Conversation
Member
I've swapped yours out with one of mine. |
danielbachhuber
approved these changes
Nov 2, 2017
schlessera
pushed a commit
that referenced
this pull request
Jan 5, 2022
Add GITHUB_TOKEN and COMPOSER_AUTH handling.
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related #44 (comment)
Adds a
Package_Command::set_composer_auth_env_var()function to set theCOMPOSER_AUTHenvironment var used by Composer with the value ofGITHUB_TOKENif available, to avoid authorization failures, and calls it before each command. (There are undoubtedly other ways to achieve this, so other ideas might be better.)Also adds
GITHUB_TOKENauthorization to the http requests à la wp-cli/wp-cli#4281.Also only sets the
@github-apitag inutils/behat-tags.phpifGITHUB_TOKENnot available - this is only temporary as will also do the same in the source of truth versionwp-cli/wp-clishortly with a PR there enabling@github-apitests on Travis.Note I temporarily added my own GITHUB_TOKEN to https://travis-ci.org/wp-cli/package-command/settings to get the tests to run, but it would probably be best if one of the maintainers added it instead.
Also changes
get_package_by_shortened_identifier()to return thehttpsurl rather than the sshgit@version, as this is actually what is tested and seems to be the recommended protocol nowadays anyway (Which remote URL should I use?), and adapts the output checks in tests accordingly.Also tags the tests involving
schlessera/test-commandas@require-php-5.5, as it's currently PHP 5.5.0 dependent - see wp-cli-test/test-command#1Also clarifies the mismatch test a bit.