File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,16 +54,3 @@ clean-all: clean
5454.PHONY : upgrade-deps
5555upgrade-deps :
5656 npm run upgrade-deps
57-
58- # Manual test targets (requires CALS_GITHUB_TOKEN env var)
59- .PHONY : test-repos
60- test-repos :
61- CALS_GITHUB_TOKEN=$(CALS_GITHUB_TOKEN ) node lib/cals-cli.mjs repos --org capralifecycle --compact
62-
63- .PHONY : test-clone
64- test-clone :
65- CALS_GITHUB_TOKEN=$(CALS_GITHUB_TOKEN ) node lib/cals-cli.mjs clone --org capralifecycle --all | head -5
66-
67- .PHONY : test-help
68- test-help :
69- node lib/cals-cli.mjs --help
Original file line number Diff line number Diff line change @@ -56,9 +56,10 @@ Before using, authenticate with: cals auth`)
5656 . command ( topics )
5757 . version ( version )
5858 . demandCommand ( )
59- . option ( "no- cache" , {
60- describe : "Bypass cache and fetch fresh data" ,
59+ . option ( "cache" , {
60+ describe : "Use cached data" ,
6161 type : "boolean" ,
62+ default : true ,
6263 } )
6364 . example ( "cals auth" , "Set GitHub token" )
6465 . example ( "cals repos" , "List repositories" )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export function createCacheProvider(
1212) : CacheProvider {
1313 const cache = new CacheProvider ( config )
1414
15- if ( argv . noCache === true ) {
15+ if ( argv . cache === false ) {
1616 cache . mustValidate = true
1717 }
1818
Original file line number Diff line number Diff line change @@ -11,18 +11,16 @@ export class GitHubTokenCliProvider implements GitHubTokenProvider {
1111 private keyringAccount = "github-token"
1212
1313 async getToken ( ) : Promise < string | undefined > {
14- if ( process . env . CALS_GITHUB_TOKEN ) {
15- return process . env . CALS_GITHUB_TOKEN
14+ if ( process . env . GITHUB_TOKEN ) {
15+ return process . env . GITHUB_TOKEN
1616 }
1717
1818 const result = await keytar . getPassword (
1919 this . keyringService ,
2020 this . keyringAccount ,
2121 )
2222 if ( result == null ) {
23- process . stderr . write (
24- "No token found. Register using `cals github set-token`\n" ,
25- )
23+ process . stderr . write ( "No token found. Register using `cals auth`\n" )
2624 return undefined
2725 }
2826
You can’t perform that action at this time.
0 commit comments