Skip to content

Commit badadf8

Browse files
committed
[TASK] add info about required github token scope if token is not found
1 parent b0a97f9 commit badadf8

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

lib/cmd/info.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ function themeInfo (data) {
2525
*/
2626
async function possibleCmds (data) {
2727
const cmds = []
28-
if (Array.isArray(data.env) && data.env.includes('GITHUB_TOKEN')) {
29-
cmds.push('rh init')
30-
}
28+
cmds.push('rh init')
3129
if (await isFileDirExists(`${data.cwd.path}/.browserslistrc`)) {
3230
cmds.push('rh browsers')
3331
}

lib/github/auth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import ora from 'ora'
1111
function checkGithubTokenEnv () {
1212
if (!process.env.GITHUB_TOKEN) {
1313
console.warn(`${chalk.red('Warning:')} No GitHub token found.`)
14-
console.warn(`Add ${chalk.yellow('GITHUB_TOKEN=your-github-token')} to ${chalk.green('.env')} file.`)
14+
console.warn(`Add ${chalk.yellow('GITHUB_TOKEN=github-classic-personal-access-token')} to ${chalk.green('.env')} file.`)
15+
console.warn(`GitHub Classic Personal access token with full ${chalk.cyan('repo')} scope is required.`)
1516
process.exit(0)
1617
}
1718
}

0 commit comments

Comments
 (0)