File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -872,6 +872,14 @@ pub fn setup_github_token_interactive() -> Result<String> {
872872 println ! ( "3. Scopes needed: repo (full control of private repos)" ) ;
873873 println ! ( "4. Click \" Generate token\" and copy the value" ) ;
874874 println ! ( ) ;
875+ println ! ( "Alternatively, set GITHUB_TOKEN or GH_TOKEN in your environment," ) ;
876+ println ! ( "or manually create the config file with:" ) ;
877+ if let Ok ( config_path) = get_github_config_path ( ) {
878+ println ! ( " {}" , config_path. display( ) ) ;
879+ }
880+ println ! ( "Contents:" ) ;
881+ println ! ( " default_token: ghp_yourtoken" ) ;
882+ println ! ( ) ;
875883 print ! ( "Enter your token: " ) ;
876884 io:: stdout ( ) . flush ( ) ?;
877885
Original file line number Diff line number Diff line change @@ -1348,7 +1348,7 @@ fn handle_pr_command(
13481348
13491349 // Ensure we have auth configured
13501350 if !has_github_token ( & repo_id. host ) {
1351- println ! ( "{}" , "GitHub authentication required." . yellow( ) ) ;
1351+ println ! ( "{}" , "GitHub authentication required (needs a Personal Access Token with the 'repo' scope) ." . yellow( ) ) ;
13521352 setup_github_token_interactive ( ) ?;
13531353 }
13541354
You can’t perform that action at this time.
0 commit comments