Skip to content

Commit 516bc81

Browse files
Throw an error if GITHUB_TOKEN isn't set
1 parent 5054889 commit 516bc81

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)