Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,35 @@ impl GitHubArgs {

println!("No GitHub token found. Please authenticate with GitHub.");
println!();
println!("Option 1 - Use GitHub CLI (recommended):");
println!(" gh auth login");
println!(" # Re-run this command");
println!("Option 1");
println!(" Run 'gh auth login' and choose to authenticate via the");
println!(" web browser flow.");
println!(" Re-run dispatch.");
println!();
println!("Option 2 - Create a Personal Access Token manually:");
println!(" 1. Visit: https://github.com/settings/tokens/new");
println!(" 2. Select scopes (permissions needed):");
println!(" • Repository access: Select your target repository");
println!(" • Repository permissions:");
println!(" - Contents: Read (for downloading release assets)");
println!(" - Issues: Write (for creating issues)");
println!(" 3. Click 'Generate token'");
println!("Option 2");
println!(" Run 'gh auth login' and choose to authenticate by pasting");
println!(" an authentication token.");
println!();
println!(" export GITHUB_TOKEN=<YOUR_TOKEN>");
println!(" # Re-run this command");
println!(" Fine-grained authentication token (PAT)");
println!(" If using a fine-grained PAT, it must have, at a minimum,");
println!(" the following permissions:");
println!(" Contents: Read-only access");
println!(" Issues: Read and write access");
println!();
println!(" Classic PAT");
println!(" If using a classic PAT, it must have, at a minimum,");
println!(" the 'repo' permission.");
println!();
println!(" Re-run dispatch.");
println!();
println!("Option 3");
println!(" Use the dispatch --token command line option and specify");
println!(" either a fine-grained or a classic PAT as described above.");
println!();
println!("Option 4");
println!(" Set an environment variable named GITHUB_TOKEN to either");
println!(" a fine-grained or a classic PAT as described above.");
println!(" Re-run dispatch.");
println!();

anyhow::bail!("GitHub authentication required. Please follow the instructions above.");
Expand Down