get_export_gist_token

Function get_export_gist_token 

Source
pub fn get_export_gist_token(gist_config: &GistConfig) -> Result<String>
Expand description

Retrieves a GitHub personal access token for gist, checking configuration and environment variables.

This function attempts to find a token by searching in the following locations, in order of precedence:

  1. The GIST_TOKEN environment variable
  2. The token field of the provided gist_config object

If a token is not found in any of these locations, the function will return an error.