Skip to content

Commit bca9093

Browse files
authored
Merge pull request #38 from wp-cli/improve/error-no-github-token
2 parents 58bc7c0 + fcd0867 commit bca9093

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.maintenance/src/GitHub.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ public static function create_release(
7171
$prerelease = false,
7272
$args = []
7373
) {
74+
75+
if ( ! getenv( 'GITHUB_TOKEN' ) ) {
76+
WP_CLI::error( 'GITHUB_TOKEN environment variable must be set.' );
77+
}
78+
7479
$request_url = sprintf(
7580
self::API_ROOT . 'repos/%s/releases',
7681
$project

0 commit comments

Comments
 (0)